Chemistry.Testing package

Submodules

Chemistry.Testing.test_CML module

class Chemistry.Testing.test_CML.test_cml_builder(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
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_build()
test_from_Compound()
test_to_file()
primary = '/var/build/user_builds/chemistry/checkouts/latest/docs'
setUp()[source]
test_build()[source]
test_from_Compound()[source]
test_to_file()[source]
class Chemistry.Testing.test_CML.test_cml_parser(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
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()
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
test_parse()
primary = '/var/build/user_builds/chemistry/checkouts/latest/docs'
setUp()[source]
tearDown()[source]
test_parse()[source]

Chemistry.Testing.test_acid_base_reactions module

class Chemistry.Testing.test_acid_base_reactions.test_AcidBase_class(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
setUpClass()
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown()
tearDownClass()
test_constructor_not_raises_TE1()
test_constructor_not_raises_TE2()
test_constructor_raises_TE()
test_equilibrium1()
test_equilibrium2()
test_equilibrium3()
test_get_acid1()
test_get_acid2()
test_get_base1()
test_get_base2()
setUp()[source]
classmethod setUpClass()[source]
tearDown()[source]
classmethod tearDownClass()[source]
test_constructor_not_raises_TE1()[source]
test_constructor_not_raises_TE2()[source]
test_constructor_raises_TE()[source]
test_equilibrium1()[source]
test_equilibrium2()[source]
test_equilibrium3()[source]
test_get_acid1()[source]
test_get_acid2()[source]
test_get_base1()[source]
test_get_base2()[source]
class Chemistry.Testing.test_acid_base_reactions.test_acid_base_reaction(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
setUpClass()
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown()
tearDownClass()
test_hydroxide_hydronium()
setUp()[source]
classmethod setUpClass()[source]
tearDown()[source]
classmethod tearDownClass()[source]
test_hydroxide_hydronium()[source]

Chemistry.Testing.test_base_reactions module

Chemistry.Testing.test_compounds module

class Chemistry.Testing.test_compounds.TestCompound(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
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_add_edge_()
test_add_edge_raises_KE()
test_add_node_()
test_add_node_raises_KE()
test_json_serializer_repr()
test_json_serializer_str()
setUp()[source]
test_add_edge_()[source]
test_add_edge_raises_KE()[source]
test_add_node_()[source]
test_add_node_raises_KE()[source]
test_json_serializer_repr()[source]
test_json_serializer_str()[source]
class Chemistry.Testing.test_compounds.TestIO(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
setUpClass()
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_from_CML()
test_to_CML()
setUp()[source]
classmethod setUpClass()[source]
test_from_CML()[source]
test_to_CML()[source]

Chemistry.Testing.test_isomorphism module

class Chemistry.Testing.test_isomorphism.TestIsomorphisms(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
setUpClass()
shortDescription() Returns a one-line description of the test, or None if no description has been provided.
skipTest(reason) Skip this test.
tearDown()
tearDownClass()
test_isomorphism1()
test_isomorphism2()
test_isomorphism3()
test_isomorphism4()
test_isomorphism_acid_compound()
test_isomorphism_base_compound()
setUp()[source]
classmethod setUpClass()[source]
tearDown()[source]
classmethod tearDownClass()[source]
test_isomorphism1()[source]
test_isomorphism2()[source]
test_isomorphism3()[source]
test_isomorphism4()[source]
test_isomorphism_acid_compound()[source]
test_isomorphism_base_compound()[source]

Chemistry.Testing.test_periodic_helpers module

class Chemistry.Testing.test_periodic_helpers.test_helpers(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
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()
tearDownClass() Hook method for deconstructing the class fixture after running all tests in the class.
test_build_table()
test_convert_type1()
test_convert_type2()
test_convert_type3()
test_convert_type4()
test_convert_type_bad()
test_str_to_list1()
test_str_to_list2()
setUp()[source]
tearDown()[source]
test_build_table()[source]
test_convert_type1()[source]
test_convert_type2()[source]
test_convert_type3()[source]
test_convert_type4()[source]
test_convert_type_bad()[source]
test_str_to_list1()[source]
test_str_to_list2()[source]

Chemistry.Testing.test_products module

class Chemistry.Testing.test_products.TestProduct(methodName='runTest')[source]

Bases: unittest.case.TestCase

Miscellaneous tests that don’t necessarily get covered by the other tests
I’ve written.

This is for the Product** class, not the Product*s* class

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
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_eq_compound()
test_getattr()
test_eq_compound()[source]
test_getattr()[source]
class Chemistry.Testing.test_products.TestProducts(methodName='runTest')[source]

Bases: unittest.case.TestCase

Miscellaneous tests that don’t necessarily get covered by the other tests
I’ve written.

This is for the Product*s* class, not the Product** class

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
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_major_property_raises_typerror1()
test_major_property_raises_typerror2()
test_major_property_raises_typerror3()
test_major_property_skips_NoneTypes()
test_minor_property_raises_typerror1()
test_minor_property_raises_typerror2()
test_minor_property_raises_typerror3()
test_minor_property_skips_NoneTypes()
test_major_property_raises_typerror1()[source]
test_major_property_raises_typerror2()[source]
test_major_property_raises_typerror3()[source]
test_major_property_skips_NoneTypes()[source]
test_minor_property_raises_typerror1()[source]
test_minor_property_raises_typerror2()[source]
test_minor_property_raises_typerror3()[source]
test_minor_property_skips_NoneTypes()[source]

Chemistry.Testing.test_reactants module

class Chemistry.Testing.test_reactants.TestBase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
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_to_conjugate_Acid()
setUp()[source]
test_to_conjugate_Acid()[source]
class Chemistry.Testing.test_reactants.TestReactantUtilityMethods(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods

__call__(*args, **kwds)
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.
assertDictEqual(d1, d2[, msg])
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.
countTestCases()
debug() Run the test without collecting errors in a TestResult
defaultTestResult()
doCleanups() Execute all cleanup functions.
fail([msg]) Fail immediately, with the given message.
failIf(*args, **kwargs)
failIfAlmostEqual(*args, **kwargs)
failIfEqual(*args, **kwargs)
failUnless(*args, **kwargs)
failUnlessAlmostEqual(*args, **kwargs)
failUnlessEqual(*args, **kwargs)
failUnlessRaises(*args, **kwargs)
failureException
id()
run([result])
setUp()
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_new_key1()
test_new_key2()
test_new_key3()
setUp()[source]
test_new_key1()[source]
test_new_key2()[source]
test_new_key3()[source]

Module contents