Test Ray

class padvinder.test.test_ray.TestRay(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_default_construction()[source]

Test if the ray is constructed with the expected default parameters.

test_input()[source]

Test if the input values are checked correctly. Values that do not validate the checks are omitted because they are covered by the remaining tests.

test_point()[source]

Test if a point with given distance along the ray is calculated correctly.

test_string()[source]

Test if the string representation of the ray is correct. Because testing against a concrete string is tough if numpy changes how they print arrays - we will just test if the call succedes.

test_hypothesis() → None[source]

Test the ray’s invariants with ‘random’ input from hypothesis