simpleml.tests package¶
Combine all the test suites and execute
Testing Paradigm: Hierarchical tests broken out by directory. Invocation Paths:
- python setup.py test
- simpleml {test, unit-test, integration-test, regression-test}
- python simpleml/tests/[unit, integration, regression, {module-name}]
1) Integrated into setuptools invocation. Done by registering load_tests in this module as the entrypoint for tests ```
test_suite=’simpleml.tests.load_tests’
2) Setuptools registered entrypoints resolving to the run_tests functions in the respective directories. run_tests calls load_tests so it executes the same tests as other invokation paths ```
- entry_points = {
- ‘console_scripts’: [
- ‘simpleml-test=simpleml.tests:run_tests’, ‘simpleml-unit-test=simpleml.tests.unit:run_tests’, ‘simpleml-integration-test=simpleml.tests.integration:run_tests’, ‘simpleml-regression-test=simpleml.tests.regression:run_tests’,
],
}
3) Calling the modules directly also invokes run_tests when calling the __init__. Otherwise it executes just the tests in the module for easy iteration on specific tests. ```
- if __name__ == ‘__main__’:
- unittest.main()