Test Geometry

class padvinder.test.test_geometry.TestGeometry(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_default_construction()[source]

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

test_non_default_construction()[source]

Test if the geometry is constructed correctly with the non-default parameters.

test_representation()[source]

Test if the geometry class is capable of printing itself.

class padvinder.test.test_geometry.TestSphere(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_default_construction()[source]

Test if the sphere is constructed correctly with non-default parameters.

test_non_default_construction()[source]

Test if the sphere is constructed correctly with the expected default parameters.

test_intersect()[source]

Test if the ray-sphere intersection works as expected.

test_normal()[source]

Test if the sphere normal is calculated correctly.

test_representation()[source]

Test if the sphere class is capable of printing itself.

class padvinder.test.test_geometry.TestPlane(material=Material(color=[0.5 0.5 0.5]))[source]

Bases: padvinder.geometry.Geometry

test_default_construction()[source]

Test if the plane is constructed correctly with non-default parameters.

test_non_default_construction()[source]

Test if the plane is constructed correctly with the expected default parameters.

test_intersect()[source]

Test if the ray-plane intersection works as expected.

test_normal()[source]

Test if the plane normal calculated correctly.

test_representation()[source]

Test if the plane class is capable of printing itself.