Skip to content

Commit fc4ecc3

Browse files
committed
Ignore more pytest warnings for PYTHONOPTIMIZE tests
1 parent 71abb2a commit fc4ecc3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hypothesis-python/scripts/basic-test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ $PYTEST tests/nocover/
6969

7070
# Run some tests without docstrings or assertions, to catch bugs
7171
# like issue #822 in one of the test decorators. See also #1541.
72-
PYTHONOPTIMIZE=2 $PYTEST tests/cover/test_testdecorators.py
72+
PYTHONOPTIMIZE=2 $PYTEST \
73+
-W'ignore:assertions not in test modules or plugins will be ignored because assert statements are not executed by the underlying Python interpreter:pytest.PytestConfigWarning' \
74+
-W'ignore:Module already imported so cannot be rewritten:pytest.PytestAssertRewriteWarning' \
75+
tests/cover/test_testdecorators.py
7376

7477
if [ "$(python -c 'import platform; print(platform.python_implementation())')" != "PyPy" ]; then
7578
pip install .[django]

0 commit comments

Comments
 (0)