mirror of https://gitlab.com/tildes/tildes.git
Browse Source
This uses pytest's "markers" system to add markers to two special types of tests: * webtest - ones that use the WebTest library and are testing the actual HTTP app, instead of executing code/functions directly * html_validation - ones that are generating HTML output (via webtest) and running it through the Nu HTML Checker to validate it. The "webtest" marker is added automatically by checking whether a test uses either of the webtest fixtures, and the html_validation one is currently added manually to the only module that has those tests. In the future, we could probably put HTML validation tests in their own folder and mark them automatically based on the module's path or something similar. This also changes the default arguments for pytest to exclude these two marked types of tests, and updates the git hooks so that webtests are run pre-commit (but not HTML validation), and all tests are run pre-push. Similar to the way we use prospector, this makes it so that the very slow tests are only run before pushing.merge-requests/126/merge
Deimos
4 years ago