()
| 254 | |
| 255 | |
| 256 | def create_tests(): |
| 257 | for dirpath, _, filenames in os.walk(TEST_PATH): |
| 258 | for filename in filenames: |
| 259 | with open(os.path.join(dirpath, filename)) as scenario_stream: |
| 260 | scenario_def = json.load(scenario_stream, object_hook=object_hook) |
| 261 | # Construct test from scenario. |
| 262 | new_test = create_test(scenario_def) |
| 263 | test_name = f"test_{os.path.splitext(filename)[0]}" |
| 264 | new_test.__name__ = test_name |
| 265 | setattr(TestAllScenarios, new_test.__name__, new_test) |
| 266 | |
| 267 | |
| 268 | create_tests() |
no test coverage detected