Commit 5f09b390 authored by Ondřej Nový's avatar Ondřej Nový

d/tests: Use AUTOPKGTEST_TMP instead of ADTTMP

parent 217670a6
python-flake8 (3.5.0-2) UNRELEASED; urgency=medium
* d/control: Set Vcs-* to salsa.debian.org
* d/tests: Use AUTOPKGTEST_TMP instead of ADTTMP
-- Ondřej Nový <onovy@debian.org> Tue, 13 Feb 2018 10:07:33 +0100
......
......@@ -4,7 +4,7 @@ set -efu
flake8 setup.py
# create a known-bad file
cat << EOF > $ADTTMP/test.py
cat << EOF > $AUTOPKGTEST_TMP/test.py
import sys # unused import
print('Hello world, this is an overly long line for PEP-8. We expect flake8 to complain')
......@@ -12,17 +12,17 @@ print('Hello world, this is an overly long line for PEP-8. We expect flake8 to c
count += 1
EOF
set +e
flake8 $ADTTMP/test.py > $ADTTMP/out
flake8 $AUTOPKGTEST_TMP/test.py > $AUTOPKGTEST_TMP/out
RC=$?
set -e
echo 'flake8 output on known-bad file:'
cat $ADTTMP/out
cat $AUTOPKGTEST_TMP/out
if [ $RC -eq 0 ]; then
echo "flake8 expected to fail, but it succeeded:" >&2
exit 1
fi
grep -q 'F401.*sys' $ADTTMP/out
grep -q 'E501.*line too long' $ADTTMP/out
grep -q 'F821.*count' $ADTTMP/out
grep -q 'F401.*sys' $AUTOPKGTEST_TMP/out
grep -q 'E501.*line too long' $AUTOPKGTEST_TMP/out
grep -q 'F821.*count' $AUTOPKGTEST_TMP/out
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment