mdsuite.utils.testing module¶
MDSuite: A Zincwarecode package.
License¶
This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zincwarecode Project.
Contact Information¶
email: zincwarecode@gmail.com github: https://github.com/zincware web: https://zincwarecode.com/
Citation¶
If you use this module please cite us with:
Summary¶
- class mdsuite.utils.testing.MDSuiteProcess(*args, **kwargs)[source]¶
Bases:
Process
Process class for use in ZnVis testing.
- property exception¶
Exception property to be stored by the process.
- mdsuite.utils.testing.assertDeepAlmostEqual(expected, actual, *args, **kwargs)[source]¶
Assert that two complex structures have almost equal contents. Compares lists, dicts and tuples recursively. Checks numeric values using test_case’s
unittest.TestCase.assertAlmostEqual()
and checks all other values withunittest.TestCase.assertEqual()
. Accepts additional positional and keyword arguments and pass those intact to assertAlmostEqual() (that’s how you specify comparison precision).- Parameters:
decimal (int) – The desired positional precision. See numpy.testing.assert_array_almost_equal for keyword arguments
References
https://github.com/larsbutler/oq-engine/blob/master/tests/utils/helpers.py