Test Camera

class padvinder.test.test_camera.TestCamera(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_default_construction()[source]

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

test_custom_construction()[source]

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

test_invalid_construction()[source]

Test if the camera construction fails as expected on invalid input

test_representation()[source]

Test if the camera class is capable of printing itself.

class padvinder.test.test_camera.TestPerspectiveCamera(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_default_construction()[source]

Test if the perspective camera is constructed with the expected default parameters.

test_custom_construction()[source]

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

test_invalid_construction()[source]

Test if the camera construction fails as expected on invalid input

test_ray()[source]

Test if the initial rays are calculated correctly - Beware that the indexing is following numpy’s convention: x is vertical & y is horizontal.

test_representation()[source]

Test if the perspective camera class is capable of printing itself.