Skip to content

Commit d09a906

Browse files
committed
pytest: ignore pytest.PytestAssertRewriteWarning
Because sopel exposes a pytest plugin that we used with an editable install, it looks like there is a conflict in Pytest: it tries to rewrite the assert from the pytest_plugin.py file, even tho it's already loaded. As a result, it generates a warning: PytestAssertRewriteWarning. This warning only means that the asserts in the file are not going to be modified, which is fine by us, as this doesn't affect third-party plugins that would use our `plugin.example` decorator. However, the warning is annoying, so we suppress it through our test configuration.
1 parent b208ff9 commit d09a906

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ show_error_codes = True
3535
python_files = *.py
3636
addopts = --tb=short -p no:nose
3737
norecursedirs = contrib
38+
filterwarnings =
39+
ignore::pytest.PytestAssertRewriteWarning

0 commit comments

Comments
 (0)