MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / assertEqualBSpline

Function assertEqualBSpline

tests/python/UnitTestUtils.py:48–62  ·  view source on GitHub ↗
(testCase, first, second)

Source from the content-addressed store, hash-verified

46 testCase.assertEqual(first.y, second.y)
47
48def assertEqualBSpline(testCase, first, second):
49 pts1 = first.getControlPoints()
50 pts2 = second.getControlPoints()
51 for pt1 in pts1:
52 try:
53 pt2 = next(pts2)
54 assertEqualControlPoint(testCase,pt1, pt2)
55 except StopIteration:
56 raise AssertionError("Different number of control points")
57 try:
58 pt2 = next(pts2)
59 except StopIteration:
60 pass
61 else:
62 raise AssertionError("Different number of control points")
63
64def assertAlmostEqualVector(testCase, first, second, delta=1e-6):
65 if len(first) != len(second):

Callers 5

test_bsplineMethod · 0.90
test_rgbcurveMethod · 0.90
test_huecurveMethod · 0.90
assertEqualRGBCurveFunction · 0.85
assertEqualHueCurveFunction · 0.85

Calls 1

assertEqualControlPointFunction · 0.85

Tested by

no test coverage detected