g3d.calc.tests package
Submodules
g3d.calc.tests.test_acoustics module
unit tests for acoustic relations calculator
- class g3d.calc.tests.test_acoustics.TestAcoustics(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: acoustic relations
Methods
__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.
test acoustic relations (args)
test acoustic relations (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_env module
calculator unit test base class
- class g3d.calc.tests.test_env.CFlowTestCase(methodName='runTest')[source]
Bases:
TestCaseCFlow unit tests base class
Methods
__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.calc.tests.test_expansion_wave module
unit tests for expansion wave calculator
- class g3d.calc.tests.test_expansion_wave.TestExpansionWave(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: expansion wave
Methods
__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.
CFlow unit tests: expansion wave (args)
CFlow unit tests: expansion wave (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_friction module
unit tests for one-dimensional flow with friction calculator
- class g3d.calc.tests.test_friction.TestFriction(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional flow with friction
Methods
__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.
CFlow unit tests: one-dimensional flow with friction (args)
CFlow unit tests: one-dimensional flow with friction (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_heat module
unit tests for one-dimensional flow with heat addition calculator
- class g3d.calc.tests.test_heat.TestHeat(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional flow with heat addition
Methods
__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.
CFlow unit tests: one-dimensional flow with heat addition (args)
CFlow unit tests: one-dimensional flow with heat addition (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_ideal_gas module
unit tests for ideal-gas calculator
- class g3d.calc.tests.test_ideal_gas.TestIdealGas(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: equation of stat (ideal gas law)
Methods
__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.
CFlow unit tests: equation of stat (ideal gas law) (args)
CFlow unit tests: equation of stat (ideal gas law) (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_moving_expansion module
unit tests for finite non-linear wave calculator (moving expansion regions)
- class g3d.calc.tests.test_moving_expansion.TestMovingExpansion(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: moving expansion waves
Methods
__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.
CFlow unit tests: moving expansion waves (args)
CFlow unit tests: moving expansion waves (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_moving_shock module
unit tests for moving shock wave calculator
- class g3d.calc.tests.test_moving_shock.TestMovingShock(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: moving shock waves
Methods
__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.
CFlow unit tests: moving shock waves (args)
CFlow unit tests: moving shock waves (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_normal_shock module
unit tests for normal-shock calculator
- class g3d.calc.tests.test_normal_shock.TestNormalShock(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional normal shock relations
Methods
__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.
CFlow unit tests: one-dimensional normal shock relations (args)
CFlow unit tests: one-dimensional normal shock relations (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_nozzle module
unit tests for quasi-one-dimensional flow calculator (nozzles and diffusers)
- class g3d.calc.tests.test_nozzle.TestNozzle(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional flow with area changes (nozzles, diffusers, …)
Methods
__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.
CFlow unit tests: one-dimensional flow with area changes (nozzles, diffusers, ...) (args)
CFlow unit tests: one-dimensional flow with area changes (nozzles, diffusers, ...) (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_oblique_shock module
unit tests for oblique-shock calculator
- class g3d.calc.tests.test_oblique_shock.TestObliqueShock(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: oblique shock waves
Methods
__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.
CFlow unit tests: oblique shock waves (args)
CFlow unit tests: oblique shock waves (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_shock_tube module
unit tests for shock-tube relations calculator
- class g3d.calc.tests.test_shock_tube.TestShockTube(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: shock-tube relations
Methods
__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.
CFlow unit tests: shock-tube relations (args)
CFlow unit tests: shock-tube relations (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
g3d.calc.tests.test_stagnation module
unit tests for total and critical (sonic) flow conditions calculator
- class g3d.calc.tests.test_stagnation.TestStagnation(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: reference flow states (stagnation, sonic flow)
Methods
__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.
CFlow unit tests: total density (args)
CFlow unit tests: total density (kwargs)
CFlow unit tests: total pressure (args)
CFlow unit tests: total pressure (kwargs)
CFlow unit tests: total temperature (args)
CFlow unit tests: total temperature (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
Module contents
g3d/calc/tests sub library
- class g3d.calc.tests.CFlowTestCase(methodName='runTest')[source]
Bases:
TestCaseCFlow unit tests base class
Methods
__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
- class g3d.calc.tests.TestAcoustics(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: acoustic relations
Methods
__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.
test acoustic relations (args)
test acoustic relations (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestExpansionWave(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: expansion wave
Methods
__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.
CFlow unit tests: expansion wave (args)
CFlow unit tests: expansion wave (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestHeat(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional flow with heat addition
Methods
__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.
CFlow unit tests: one-dimensional flow with heat addition (args)
CFlow unit tests: one-dimensional flow with heat addition (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestIdealGas(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: equation of stat (ideal gas law)
Methods
__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.
CFlow unit tests: equation of stat (ideal gas law) (args)
CFlow unit tests: equation of stat (ideal gas law) (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestMovingExpansion(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: moving expansion waves
Methods
__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.
CFlow unit tests: moving expansion waves (args)
CFlow unit tests: moving expansion waves (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestNormalShock(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional normal shock relations
Methods
__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.
CFlow unit tests: one-dimensional normal shock relations (args)
CFlow unit tests: one-dimensional normal shock relations (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestNozzle(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: one-dimensional flow with area changes (nozzles, diffusers, …)
Methods
__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.
CFlow unit tests: one-dimensional flow with area changes (nozzles, diffusers, ...) (args)
CFlow unit tests: one-dimensional flow with area changes (nozzles, diffusers, ...) (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestObliqueShock(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: oblique shock waves
Methods
__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.
CFlow unit tests: oblique shock waves (args)
CFlow unit tests: oblique shock waves (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestShockTube(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: shock-tube relations
Methods
__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.
CFlow unit tests: shock-tube relations (args)
CFlow unit tests: shock-tube relations (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run
- class g3d.calc.tests.TestStagnation(methodName='runTest')[source]
Bases:
CFlowTestCaseCFlow unit tests: reference flow states (stagnation, sonic flow)
Methods
__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.
CFlow unit tests: total density (args)
CFlow unit tests: total density (kwargs)
CFlow unit tests: total pressure (args)
CFlow unit tests: total pressure (kwargs)
CFlow unit tests: total temperature (args)
CFlow unit tests: total temperature (kwargs)
assertAlmostEquals
assertDictEqual
assertEquals
assertNotAlmostEquals
assertNotEquals
assertNotRegexpMatches
assertRaisesRegexp
assertRegexpMatches
assert_
countTestCases
defaultTestResult
failIf
failIfAlmostEqual
failIfEqual
failUnless
failUnlessAlmostEqual
failUnlessEqual
failUnlessRaises
id
run