g3d.flow.tests package
Submodules
g3d.flow.tests.test_env module
generic flow unit test placeholder
- class g3d.flow.tests.test_env.G3DFlowTestCase(methodName='runTest')[source]
Bases:
TestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.flow.tests.test_flux module
unit tests for flux operator
- class g3d.flow.tests.test_flux.TestFlux(methodName='runTest')[source]
Bases:
G3DFlowTestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
test_calculate_face_gradients
test_cflux
test_dflux
test_wall_dflux
test_wall_dflux_model
g3d.flow.tests.test_metrics module
unit tests for metrics operators
- class g3d.flow.tests.test_metrics.TestMetrics(methodName='runTest')[source]
Bases:
G3DFlowTestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
test_conv_metrics
test_diff_metrics
test_volume
test_wall_diff_metrics
g3d.flow.tests.test_moc module
unit tests for method of characteristics (MOC)
- class g3d.flow.tests.test_moc.TestMOC(methodName='runTest')[source]
Bases:
G3DFlowTestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
test_evaluate_moc
g3d.flow.tests.test_solver module
unit tests for flow solver
- class g3d.flow.tests.test_solver.TestSolver(methodName='runTest')[source]
Bases:
G3DFlowTestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
test_ltsp
g3d.flow.tests.test_state_relation module
unit tests for state relations (ideal gas relations)
- class g3d.flow.tests.test_state_relation.TestStateRelation(methodName='runTest')[source]
Bases:
G3DFlowTestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
test_calculate_density
test_calculate_energy
test_calculate_pressure
test_calculate_speed_of_sound
test_calculate_temperature
Module contents
g3d/flow/tests sub library
- class g3d.flow.tests.G3DFlowTestCase(methodName='runTest')[source]
Bases:
TestCaseMethods
__call__(*args, **kwds)Call self as a function.
addClassCleanup(function, /, *args, **kwargs)Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).
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 difference between the two objects is more than the given delta.
assertCountEqual(first, second[, msg])Asserts that two iterables have the same elements, the same number of times, without regard to order.
assertDictContainsSubset(subset, dictionary)Checks whether dictionary is a superset of subset.
assertEqual(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.
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.
assertLogs([logger, level])Fail unless a log message of level level or higher is emitted on logger_name or its children.
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 difference 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.
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.
assertNotRegex(text, unexpected_regex[, msg])Fail the test if the text matches the regular expression.
assertRaises(expected_exception, *args, **kwargs)Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.
assertRaisesRegex(expected_exception, ...)Asserts that the message in a raised exception matches a regex.
assertRegex(text, expected_regex[, 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.
assertWarns(expected_warning, *args, **kwargs)Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.
assertWarnsRegex(expected_warning, ...)Asserts that the message in a triggered warning matches a regexp.
debug()Run the test without collecting errors in a TestResult
doClassCleanups()Execute all class cleanup functions.
doCleanups()Execute all cleanup functions.
fail([msg])Fail immediately, with the given message.
failureExceptionalias of
AssertionErrorsetUp()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.
subTest([msg])Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.
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.
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run