A module to run openfisca yaml tests
openfisca_core.tools.test_runner.generate_tests(tax_benefit_system, paths, options={})[source]¶Generates a lazy iterator of all the YAML tests contained in a file or a directory.
| Parameters: | Same as run_tests() |
|---|---|
| Returns: | a generator of YAML tests |
openfisca_core.tools.test_runner.run_tests(tax_benefit_system, paths, options={})[source]¶Runs all the YAML tests contained in a file or a directory.
If path is a directory, subdirectories will be recursively explored.
| Parameters: |
|
|---|---|
| Raises: | AssertionError – if a test does not pass |
| Returns: | the number of sucessful tests excecuted |
Testing options:
| Key | Type | Role |
|---|---|---|
| verbose | bool |
See openfisca-run-test options doc |
| name_filter | str |
Tests can also be run in the console with openfisca-run-test.