Skip to content

Commit

Permalink
raise exception on warnings when running tests with inv test (#281)
Browse files Browse the repository at this point in the history
Previously: When running tests with tox, and if there's a warning
issued, the tests fail. This option is not used in tasks.py (for
"invoke test").

Now: Warnings will fail tests also when running "invoke test" (or:
"inv test").
  • Loading branch information
fohrloop authored May 18, 2024
1 parent d110be7 commit 6a8c9d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def test(c, pdb: bool = False) -> None:
run = get_run_with_print(c)
pdb_flag = " --pdb " if pdb else ""
res = run(
f"env -u DBUS_SESSION_BUS_ADDRESS python -m pytest {pdb_flag}--cov-branch "
"--cov wakepy --cov-fail-under=100",
f"env -u DBUS_SESSION_BUS_ADDRESS python -m pytest -W error {pdb_flag}"
"--cov-branch --cov wakepy --cov-fail-under=100",
ignore_errors=True,
)
if res.exited:
Expand Down

0 comments on commit 6a8c9d6

Please sign in to comment.