geometry.unittests package

Submodules

geometry.unittests.distances_test module

geometry.unittests.mds_test module

geometry.unittests.mds_test.euclidean_distances_test()[source]
geometry.unittests.mds_test.evaluate_error(P1, P2)[source]
geometry.unittests.mds_test.mds_fast_test()[source]
geometry.unittests.mds_test.mds_test()[source]
geometry.unittests.mds_test.place_test()[source]
geometry.unittests.mds_test.rank_test()[source]

Check that the double-centered matrix has small rank.

geometry.unittests.misc_tests module

class geometry.unittests.misc_tests.UtilsTests(methodName='runTest')[source]

Bases: geometry.unittests.utils.GeoTestCase

Methods

addCleanup(function, *args, **kwargs) Add a function, with arguments, to be called when the test is completed.
addTypeEqualityFunc(typeobj, function) Add a type specific assertEqual style function to compare a type.
assertAlmostEqual(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertAlmostEquals(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertDictContainsSubset(expected, actual[, msg]) Checks whether actual is a superset of expected.
assertEqual(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertEquals(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertFalse(expr[, msg]) Check that the expression is false.
assertGreater(a, b[, msg]) Just like self.assertTrue(a > b), but with a nicer default message.
assertGreaterEqual(a, b[, msg]) Just like self.assertTrue(a >= b), but with a nicer default message.
assertIn(member, container[, msg]) Just like self.assertTrue(a in b), but with a nicer default message.
assertIs(expr1, expr2[, msg]) Just like self.assertTrue(a is b), but with a nicer default message.
assertIsInstance(obj, cls[, msg]) Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
assertIsNone(obj[, msg]) Same as self.assertTrue(obj is None), with a nicer default message.
assertIsNot(expr1, expr2[, msg]) Just like self.assertTrue(a is not b), but with a nicer default message.
assertIsNotNone(obj[, msg]) Included for symmetry with assertIsNone.
assertItemsEqual(expected_seq, actual_seq[, msg]) An unordered sequence specific comparison.
assertLess(a, b[, msg]) Just like self.assertTrue(a < b), but with a nicer default message.
assertLessEqual(a, b[, msg]) Just like self.assertTrue(a <= b), but with a nicer default message.
assertListEqual(list1, list2[, msg]) A list-specific equality assertion.
assertMultiLineEqual(first, second[, msg]) Assert that two multi-line strings are equal.
assertNotAlmostEqual(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotAlmostEquals(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotEqual(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotEquals(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotIn(member, container[, msg]) Just like self.assertTrue(a not in b), but with a nicer default message.
assertNotIsInstance(obj, cls[, msg]) Included for symmetry with assertIsInstance.
assertNotRegexpMatches(text, unexpected_regexp) Fail the test if the text matches the regular expression.
assertRaises(excClass[, callableObj]) Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs.
assertRaisesRegexp(expected_exception, …) Asserts that the message in a raised exception matches a regexp.
assertRegexpMatches(text, expected_regexp[, msg]) Fail the test unless the text matches the regular expression.
assertSequenceEqual(seq1, seq2[, msg, seq_type]) An equality assertion for ordered sequences (like lists and tuples).
assertSetEqual(set1, set2[, msg]) A set-specific equality assertion.
assertTrue(expr[, msg]) Check that the expression is true.
assertTupleEqual(tuple1, tuple2[, msg]) A tuple-specific equality assertion.
assert_(expr[, msg]) Check that the expression is true.
check_conversion(sequence, op1, op2) Checks that x = op2(op1(x)) for all x in sequence.
debug() Run the test without collecting errors in a TestResult
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failureException alias of exceptions.AssertionError
setUp() Hook method for setting up the test fixture before exercising it.
setUpClass() Hook method for setting up class fixture before running tests in the class.
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown() Hook method for deconstructing the test fixture after testing it.
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
__call__  
assertDictEqual  
check_one  
countTestCases  
defaultTestResult  
failIf  
failIfAlmostEqual  
failIfEqual  
failUnless  
failUnlessAlmostEqual  
failUnlessEqual  
failUnlessRaises  
hat_test  
id  
run  
hat_test()[source]

geometry.unittests.poses_test module

class geometry.unittests.poses_test.PosesTest(methodName='runTest')[source]

Bases: geometry.unittests.utils.GeoTestCase

Methods

addCleanup(function, *args, **kwargs) Add a function, with arguments, to be called when the test is completed.
addTypeEqualityFunc(typeobj, function) Add a type specific assertEqual style function to compare a type.
assertAlmostEqual(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertAlmostEquals(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertDictContainsSubset(expected, actual[, msg]) Checks whether actual is a superset of expected.
assertEqual(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertEquals(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertFalse(expr[, msg]) Check that the expression is false.
assertGreater(a, b[, msg]) Just like self.assertTrue(a > b), but with a nicer default message.
assertGreaterEqual(a, b[, msg]) Just like self.assertTrue(a >= b), but with a nicer default message.
assertIn(member, container[, msg]) Just like self.assertTrue(a in b), but with a nicer default message.
assertIs(expr1, expr2[, msg]) Just like self.assertTrue(a is b), but with a nicer default message.
assertIsInstance(obj, cls[, msg]) Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
assertIsNone(obj[, msg]) Same as self.assertTrue(obj is None), with a nicer default message.
assertIsNot(expr1, expr2[, msg]) Just like self.assertTrue(a is not b), but with a nicer default message.
assertIsNotNone(obj[, msg]) Included for symmetry with assertIsNone.
assertItemsEqual(expected_seq, actual_seq[, msg]) An unordered sequence specific comparison.
assertLess(a, b[, msg]) Just like self.assertTrue(a < b), but with a nicer default message.
assertLessEqual(a, b[, msg]) Just like self.assertTrue(a <= b), but with a nicer default message.
assertListEqual(list1, list2[, msg]) A list-specific equality assertion.
assertMultiLineEqual(first, second[, msg]) Assert that two multi-line strings are equal.
assertNotAlmostEqual(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotAlmostEquals(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotEqual(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotEquals(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotIn(member, container[, msg]) Just like self.assertTrue(a not in b), but with a nicer default message.
assertNotIsInstance(obj, cls[, msg]) Included for symmetry with assertIsInstance.
assertNotRegexpMatches(text, unexpected_regexp) Fail the test if the text matches the regular expression.
assertRaises(excClass[, callableObj]) Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs.
assertRaisesRegexp(expected_exception, …) Asserts that the message in a raised exception matches a regexp.
assertRegexpMatches(text, expected_regexp[, msg]) Fail the test unless the text matches the regular expression.
assertSequenceEqual(seq1, seq2[, msg, seq_type]) An equality assertion for ordered sequences (like lists and tuples).
assertSetEqual(set1, set2[, msg]) A set-specific equality assertion.
assertTrue(expr[, msg]) Check that the expression is true.
assertTupleEqual(tuple1, tuple2[, msg]) A tuple-specific equality assertion.
assert_(expr[, msg]) Check that the expression is true.
check_conversion(sequence, op1, op2) Checks that x = op2(op1(x)) for all x in sequence.
debug() Run the test without collecting errors in a TestResult
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failureException alias of exceptions.AssertionError
setUp() Hook method for setting up the test fixture before exercising it.
setUpClass() Hook method for setting up class fixture before running tests in the class.
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown() Hook method for deconstructing the test fixture after testing it.
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
__call__  
assertDictEqual  
check_one  
countTestCases  
defaultTestResult  
failIf  
failIfAlmostEqual  
failIfEqual  
failUnless  
failUnlessAlmostEqual  
failUnlessEqual  
failUnlessRaises  
id  
run  
test_conversions_SE2  
test_conversions_rot2d  
test_conversions_se2  
test_conversions_se2_SE2  
test_conversions_SE2()[source]
test_conversions_rot2d()[source]
test_conversions_se2()[source]
test_conversions_se2_SE2()[source]
geometry.unittests.poses_test.check_pi_test()[source]
geometry.unittests.poses_test.comparison_test()[source]

Compares between SE2_from_se2_slow and SE2_from_se2.

geometry.unittests.poses_test.comparison_test_2()[source]

Compares between se2_from_SE2 and se2_from_SE2_slow.

geometry.unittests.procrustes_test module

geometry.unittests.procrustes_test.best_orthogonal_transform_test1()[source]
geometry.unittests.procrustes_test.best_orthogonal_transform_test2()[source]
geometry.unittests.procrustes_test.best_similarity_transform_test()[source]
geometry.unittests.procrustes_test.closest_orthogonal_matrix_test1()[source]

geometry.unittests.quaternions_test module

class geometry.unittests.quaternions_test.TestQuaternions(methodName='runTest')[source]

Bases: geometry.unittests.utils.GeoTestCase

Methods

addCleanup(function, *args, **kwargs) Add a function, with arguments, to be called when the test is completed.
addTypeEqualityFunc(typeobj, function) Add a type specific assertEqual style function to compare a type.
assertAlmostEqual(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertAlmostEquals(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertDictContainsSubset(expected, actual[, msg]) Checks whether actual is a superset of expected.
assertEqual(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertEquals(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertFalse(expr[, msg]) Check that the expression is false.
assertGreater(a, b[, msg]) Just like self.assertTrue(a > b), but with a nicer default message.
assertGreaterEqual(a, b[, msg]) Just like self.assertTrue(a >= b), but with a nicer default message.
assertIn(member, container[, msg]) Just like self.assertTrue(a in b), but with a nicer default message.
assertIs(expr1, expr2[, msg]) Just like self.assertTrue(a is b), but with a nicer default message.
assertIsInstance(obj, cls[, msg]) Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
assertIsNone(obj[, msg]) Same as self.assertTrue(obj is None), with a nicer default message.
assertIsNot(expr1, expr2[, msg]) Just like self.assertTrue(a is not b), but with a nicer default message.
assertIsNotNone(obj[, msg]) Included for symmetry with assertIsNone.
assertItemsEqual(expected_seq, actual_seq[, msg]) An unordered sequence specific comparison.
assertLess(a, b[, msg]) Just like self.assertTrue(a < b), but with a nicer default message.
assertLessEqual(a, b[, msg]) Just like self.assertTrue(a <= b), but with a nicer default message.
assertListEqual(list1, list2[, msg]) A list-specific equality assertion.
assertMultiLineEqual(first, second[, msg]) Assert that two multi-line strings are equal.
assertNotAlmostEqual(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotAlmostEquals(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotEqual(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotEquals(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotIn(member, container[, msg]) Just like self.assertTrue(a not in b), but with a nicer default message.
assertNotIsInstance(obj, cls[, msg]) Included for symmetry with assertIsInstance.
assertNotRegexpMatches(text, unexpected_regexp) Fail the test if the text matches the regular expression.
assertRaises(excClass[, callableObj]) Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs.
assertRaisesRegexp(expected_exception, …) Asserts that the message in a raised exception matches a regexp.
assertRegexpMatches(text, expected_regexp[, msg]) Fail the test unless the text matches the regular expression.
assertSequenceEqual(seq1, seq2[, msg, seq_type]) An equality assertion for ordered sequences (like lists and tuples).
assertSetEqual(set1, set2[, msg]) A set-specific equality assertion.
assertTrue(expr[, msg]) Check that the expression is true.
assertTupleEqual(tuple1, tuple2[, msg]) A tuple-specific equality assertion.
assert_(expr[, msg]) Check that the expression is true.
check_conversion(sequence, op1, op2) Checks that x = op2(op1(x)) for all x in sequence.
debug() Run the test without collecting errors in a TestResult
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failureException alias of exceptions.AssertionError
setUp() Hook method for setting up the test fixture before exercising it.
setUpClass() Hook method for setting up class fixture before running tests in the class.
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown() Hook method for deconstructing the test fixture after testing it.
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
__call__  
assertDictEqual  
check_one  
countTestCases  
defaultTestResult  
failIf  
failIfAlmostEqual  
failIfEqual  
failUnless  
failUnlessAlmostEqual  
failUnlessEqual  
failUnlessRaises  
id  
run  
test_conversions  
test_conversions2  
test_rotation_conversion1  
test_rotation_conversion2  
test_rotation_from_axis_angle2  
test_conversions()[source]
test_conversions2()[source]
test_rotation_conversion1()[source]
test_rotation_conversion2()[source]
test_rotation_from_axis_angle2()[source]

geometry.unittests.random_geometry_density_tests module

geometry.unittests.random_geometry_tests module

class geometry.unittests.random_geometry_tests.GeometryTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

addCleanup(function, *args, **kwargs) Add a function, with arguments, to be called when the test is completed.
addTypeEqualityFunc(typeobj, function) Add a type specific assertEqual style function to compare a type.
assertAlmostEqual(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertAlmostEquals(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertDictContainsSubset(expected, actual[, msg]) Checks whether actual is a superset of expected.
assertEqual(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertEquals(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertFalse(expr[, msg]) Check that the expression is false.
assertGreater(a, b[, msg]) Just like self.assertTrue(a > b), but with a nicer default message.
assertGreaterEqual(a, b[, msg]) Just like self.assertTrue(a >= b), but with a nicer default message.
assertIn(member, container[, msg]) Just like self.assertTrue(a in b), but with a nicer default message.
assertIs(expr1, expr2[, msg]) Just like self.assertTrue(a is b), but with a nicer default message.
assertIsInstance(obj, cls[, msg]) Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
assertIsNone(obj[, msg]) Same as self.assertTrue(obj is None), with a nicer default message.
assertIsNot(expr1, expr2[, msg]) Just like self.assertTrue(a is not b), but with a nicer default message.
assertIsNotNone(obj[, msg]) Included for symmetry with assertIsNone.
assertItemsEqual(expected_seq, actual_seq[, msg]) An unordered sequence specific comparison.
assertLess(a, b[, msg]) Just like self.assertTrue(a < b), but with a nicer default message.
assertLessEqual(a, b[, msg]) Just like self.assertTrue(a <= b), but with a nicer default message.
assertListEqual(list1, list2[, msg]) A list-specific equality assertion.
assertMultiLineEqual(first, second[, msg]) Assert that two multi-line strings are equal.
assertNotAlmostEqual(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotAlmostEquals(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotEqual(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotEquals(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotIn(member, container[, msg]) Just like self.assertTrue(a not in b), but with a nicer default message.
assertNotIsInstance(obj, cls[, msg]) Included for symmetry with assertIsInstance.
assertNotRegexpMatches(text, unexpected_regexp) Fail the test if the text matches the regular expression.
assertRaises(excClass[, callableObj]) Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs.
assertRaisesRegexp(expected_exception, …) Asserts that the message in a raised exception matches a regexp.
assertRegexpMatches(text, expected_regexp[, msg]) Fail the test unless the text matches the regular expression.
assertSequenceEqual(seq1, seq2[, msg, seq_type]) An equality assertion for ordered sequences (like lists and tuples).
assertSetEqual(set1, set2[, msg]) A set-specific equality assertion.
assertTrue(expr[, msg]) Check that the expression is true.
assertTupleEqual(tuple1, tuple2[, msg]) A tuple-specific equality assertion.
assert_(expr[, msg]) Check that the expression is true.
debug() Run the test without collecting errors in a TestResult
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failureException alias of exceptions.AssertionError
setUp() Hook method for setting up the test fixture before exercising it.
setUpClass() Hook method for setting up class fixture before running tests in the class.
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown() Hook method for deconstructing the test fixture after testing it.
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
test_random_quaternions()
__call__  
assertDictEqual  
countTestCases  
defaultTestResult  
failIf  
failIfAlmostEqual  
failIfEqual  
failUnless  
failUnlessAlmostEqual  
failUnlessEqual  
failUnlessRaises  
id  
is_contracts_active  
run  
test_checks  
test_distances  
test_random_direction  
test_random_directions  
test_random_rotations  
test_unit_length  
is_contracts_active()[source]
test_checks()[source]
test_distances()[source]
test_random_direction()[source]
test_random_directions()[source]
test_random_quaternions()[source]
test_random_rotations()[source]
test_unit_length()[source]
geometry.unittests.random_geometry_tests.any_distant_direction_test()[source]
geometry.unittests.random_geometry_tests.any_orthogonal_direction_test()[source]
geometry.unittests.random_geometry_tests.assert_orthogonal_test()[source]
geometry.unittests.random_geometry_tests.check_reasonable_radius(r, r2, N)[source]
geometry.unittests.random_geometry_tests.default_axis_orthogonal_test()[source]
geometry.unittests.random_geometry_tests.distribution_radius_check(center, radius, N)[source]
geometry.unittests.random_geometry_tests.distribution_radius_test()[source]
geometry.unittests.random_geometry_tests.random_directions_bounded_check(ndim, radius, N)[source]
geometry.unittests.random_geometry_tests.random_directions_bounded_test()[source]
geometry.unittests.random_geometry_tests.random_directions_bounded_test_1()[source]
geometry.unittests.random_geometry_tests.random_orthogonal_direction_test()[source]
geometry.unittests.random_geometry_tests.sorted_directions_test()[source]

geometry.unittests.rotations_tests module

class geometry.unittests.rotations_tests.RotationsTest(methodName='runTest')[source]

Bases: geometry.unittests.utils.GeoTestCase

Methods

addCleanup(function, *args, **kwargs) Add a function, with arguments, to be called when the test is completed.
addTypeEqualityFunc(typeobj, function) Add a type specific assertEqual style function to compare a type.
assertAlmostEqual(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertAlmostEquals(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertDictContainsSubset(expected, actual[, msg]) Checks whether actual is a superset of expected.
assertEqual(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertEquals(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertFalse(expr[, msg]) Check that the expression is false.
assertGreater(a, b[, msg]) Just like self.assertTrue(a > b), but with a nicer default message.
assertGreaterEqual(a, b[, msg]) Just like self.assertTrue(a >= b), but with a nicer default message.
assertIn(member, container[, msg]) Just like self.assertTrue(a in b), but with a nicer default message.
assertIs(expr1, expr2[, msg]) Just like self.assertTrue(a is b), but with a nicer default message.
assertIsInstance(obj, cls[, msg]) Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
assertIsNone(obj[, msg]) Same as self.assertTrue(obj is None), with a nicer default message.
assertIsNot(expr1, expr2[, msg]) Just like self.assertTrue(a is not b), but with a nicer default message.
assertIsNotNone(obj[, msg]) Included for symmetry with assertIsNone.
assertItemsEqual(expected_seq, actual_seq[, msg]) An unordered sequence specific comparison.
assertLess(a, b[, msg]) Just like self.assertTrue(a < b), but with a nicer default message.
assertLessEqual(a, b[, msg]) Just like self.assertTrue(a <= b), but with a nicer default message.
assertListEqual(list1, list2[, msg]) A list-specific equality assertion.
assertMultiLineEqual(first, second[, msg]) Assert that two multi-line strings are equal.
assertNotAlmostEqual(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotAlmostEquals(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotEqual(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotEquals(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotIn(member, container[, msg]) Just like self.assertTrue(a not in b), but with a nicer default message.
assertNotIsInstance(obj, cls[, msg]) Included for symmetry with assertIsInstance.
assertNotRegexpMatches(text, unexpected_regexp) Fail the test if the text matches the regular expression.
assertRaises(excClass[, callableObj]) Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs.
assertRaisesRegexp(expected_exception, …) Asserts that the message in a raised exception matches a regexp.
assertRegexpMatches(text, expected_regexp[, msg]) Fail the test unless the text matches the regular expression.
assertSequenceEqual(seq1, seq2[, msg, seq_type]) An equality assertion for ordered sequences (like lists and tuples).
assertSetEqual(set1, set2[, msg]) A set-specific equality assertion.
assertTrue(expr[, msg]) Check that the expression is true.
assertTupleEqual(tuple1, tuple2[, msg]) A tuple-specific equality assertion.
assert_(expr[, msg]) Check that the expression is true.
check_conversion(sequence, op1, op2) Checks that x = op2(op1(x)) for all x in sequence.
debug() Run the test without collecting errors in a TestResult
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failureException alias of exceptions.AssertionError
setUp() Hook method for setting up the test fixture before exercising it.
setUpClass() Hook method for setting up class fixture before running tests in the class.
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown() Hook method for deconstructing the test fixture after testing it.
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
__call__  
assertDictEqual  
check_one  
countTestCases  
defaultTestResult  
failIf  
failIfAlmostEqual  
failIfEqual  
failUnless  
failUnlessAlmostEqual  
failUnlessEqual  
failUnlessRaises  
id  
run  
test_conversions1  
test_conversions2  
test_distances_rotations  
test_slerp  
test_conversions1()[source]
test_conversions2()[source]
test_distances_rotations()[source]
test_slerp()[source]
geometry.unittests.rotations_tests.hat_map_test()[source]
geometry.unittests.rotations_tests.rotation_from_axes_spec__test()[source]

geometry.unittests.spheres_tests module

geometry.unittests.uniform_dist_pvalue_paranoia module

geometry.unittests.utils module

class geometry.unittests.utils.GeoTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

addCleanup(function, *args, **kwargs) Add a function, with arguments, to be called when the test is completed.
addTypeEqualityFunc(typeobj, function) Add a type specific assertEqual style function to compare a type.
assertAlmostEqual(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertAlmostEquals(first, second[, places, …]) Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is more than the given delta.
assertDictContainsSubset(expected, actual[, msg]) Checks whether actual is a superset of expected.
assertEqual(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertEquals(first, second[, msg]) Fail if the two objects are unequal as determined by the ‘==’ operator.
assertFalse(expr[, msg]) Check that the expression is false.
assertGreater(a, b[, msg]) Just like self.assertTrue(a > b), but with a nicer default message.
assertGreaterEqual(a, b[, msg]) Just like self.assertTrue(a >= b), but with a nicer default message.
assertIn(member, container[, msg]) Just like self.assertTrue(a in b), but with a nicer default message.
assertIs(expr1, expr2[, msg]) Just like self.assertTrue(a is b), but with a nicer default message.
assertIsInstance(obj, cls[, msg]) Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.
assertIsNone(obj[, msg]) Same as self.assertTrue(obj is None), with a nicer default message.
assertIsNot(expr1, expr2[, msg]) Just like self.assertTrue(a is not b), but with a nicer default message.
assertIsNotNone(obj[, msg]) Included for symmetry with assertIsNone.
assertItemsEqual(expected_seq, actual_seq[, msg]) An unordered sequence specific comparison.
assertLess(a, b[, msg]) Just like self.assertTrue(a < b), but with a nicer default message.
assertLessEqual(a, b[, msg]) Just like self.assertTrue(a <= b), but with a nicer default message.
assertListEqual(list1, list2[, msg]) A list-specific equality assertion.
assertMultiLineEqual(first, second[, msg]) Assert that two multi-line strings are equal.
assertNotAlmostEqual(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotAlmostEquals(first, second[, …]) Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the between the two objects is less than the given delta.
assertNotEqual(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotEquals(first, second[, msg]) Fail if the two objects are equal as determined by the ‘!=’ operator.
assertNotIn(member, container[, msg]) Just like self.assertTrue(a not in b), but with a nicer default message.
assertNotIsInstance(obj, cls[, msg]) Included for symmetry with assertIsInstance.
assertNotRegexpMatches(text, unexpected_regexp) Fail the test if the text matches the regular expression.
assertRaises(excClass[, callableObj]) Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs.
assertRaisesRegexp(expected_exception, …) Asserts that the message in a raised exception matches a regexp.
assertRegexpMatches(text, expected_regexp[, msg]) Fail the test unless the text matches the regular expression.
assertSequenceEqual(seq1, seq2[, msg, seq_type]) An equality assertion for ordered sequences (like lists and tuples).
assertSetEqual(set1, set2[, msg]) A set-specific equality assertion.
assertTrue(expr[, msg]) Check that the expression is true.
assertTupleEqual(tuple1, tuple2[, msg]) A tuple-specific equality assertion.
assert_(expr[, msg]) Check that the expression is true.
check_conversion(sequence, op1, op2) Checks that x = op2(op1(x)) for all x in sequence.
debug() Run the test without collecting errors in a TestResult
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failureException alias of exceptions.AssertionError
setUp() Hook method for setting up the test fixture before exercising it.
setUpClass() Hook method for setting up class fixture before running tests in the class.
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown() Hook method for deconstructing the test fixture after testing it.
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
__call__  
assertDictEqual  
check_one  
countTestCases  
defaultTestResult  
failIf  
failIfAlmostEqual  
failIfEqual  
failUnless  
failUnlessAlmostEqual  
failUnlessEqual  
failUnlessRaises  
id  
run  
check_conversion(sequence, op1, op2)[source]

Checks that x = op2(op1(x)) for all x in sequence. If intermediate results are tuples, they are passed as distinct parameters.

check_one(x, op1, op2)[source]
geometry.unittests.utils.axis_angle_sequence()[source]
geometry.unittests.utils.directions_sequence()[source]

Sequence of directions in S^2.

geometry.unittests.utils.quaternions_sequence()[source]
geometry.unittests.utils.random_axis_angle()[source]
geometry.unittests.utils.rotations_sequence()[source]

geometry.unittests.utils_test module

geometry.unittests.utils_test.spherical_cap_area_test()[source]
geometry.unittests.utils_test.spherical_cap_with_area_test()[source]

Module contents