Browse Source

Add --full flag to invoke test

This is simpler than needing to know that --html-validation is the flag
to use to make sure that all tests are run, and can stay constant even
if we add other types of excluded-by-default tests in the future.
merge-requests/126/merge
Deimos 4 years ago
parent
commit
9652dfb722
  1. 2
      git_hooks/pre-push
  2. 4
      tildes/tasks.py

2
git_hooks/pre-push

@ -3,4 +3,4 @@
# Pre-push hook script that ensures all tests and code checks pass
vagrant ssh -c ". activate \
&& invoke type-checking test --quiet --html-validation check-code-style --full"
&& invoke type-checking test --quiet --full check-code-style --full"

4
tildes/tasks.py

@ -39,12 +39,13 @@ def check_code_style(context, full=False):
@task(
help={
"full": "Include all tests",
"html-validation": "Include HTML validation (very slow, includes webtests)",
"quiet": "Reduce verbosity",
"webtests": "Include webtests (a little slow)",
}
)
def test(context, quiet=False, webtests=False, html_validation=False):
def test(context, full=False, quiet=False, webtests=False, html_validation=False):
"""Run the tests.
By default, webtests (ones that make actual HTTP requests to the app) and HTML
@ -58,6 +59,7 @@ def test(context, quiet=False, webtests=False, html_validation=False):
pytest_args = []
excluded_markers = []
if not full:
if not webtests:
excluded_markers.append("webtest")
if not html_validation:

Loading…
Cancel
Save