-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete unnecessary check and add new test with assertions
- Loading branch information
Showing
2 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
try: | ||
from . import common as c | ||
except BaseException: | ||
import common as c | ||
|
||
|
||
class TestSplineConstructors(c.unittest.TestCase): | ||
"""Perform checks and see if spline data is coherent""" | ||
|
||
def testBSplines(self): | ||
""" | ||
Perform checks on BSpline class | ||
""" | ||
self.assertRaisesRegex( | ||
RuntimeError, | ||
"SPLINEPY ERROR - Invalid number of control points. 2 exepcted, " | ||
"but 0 were given.", | ||
c.splinepy.BSpline, | ||
degrees=[1], | ||
knot_vectors=[[0, 0, 1, 1]], | ||
control_points=c.np.ones((0, 0)), | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
c.unittest.main() |