Skip to content

Commit e100699

Browse files
committed
test: enable test mode and hard fail on warning
Let us detect any possible deprecations and upcoming problems before we learn them the hard way.
1 parent 192d78f commit e100699

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/run-tests.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ GEN_HTML=0
8787
RUN_JOBS=
8888
unset RUN_UNITTEST_PAT
8989
unset RUN_BLACKBOX_PAT
90+
export PYTHONDEVMODE=1
91+
export PYTHONASYNCIODEBUG=1
92+
export PYTHONWARNINGS=error
93+
if [[ $(python3 --version) = "Python 3.9.7" ]] ; then
94+
# Stupid workaround for https://bugs.python.org/issue45097
95+
# Just ignore all deprecation warnings. To add insult to injury we
96+
# can't just ignore anything caused by asyncio because the full pacakge
97+
# name must be given in PYTHONWARNINGS.
98+
PYTHONWARNINGS+=",ignore::DeprecationWarning"
99+
fi
90100

91101
# check if python coverage is installed
92102
if type -fp coverage3 >/dev/null; then

0 commit comments

Comments
 (0)