Files
autospec/Makefile
T
Matthew Johnson 9739ab703a Turn off ConfigParser string interpolation
configparser.ConfigParser attempts to interpolate "%" characters in the
values of the key-value pairs when parsing. This is absolutely unwanted
behavior, especially when parsing URLs such as

<sourceforge url>/joe-editor/files/JOE%20sources/<joe tar>

which cause an uncaught exception.

Turn off interpolation by passing the interpolation=None argument to
ConfigParser.

Add a unit tests to report when ConfigParser(...) is called in the
codebase without setting interpolation to None.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2018-01-11 17:24:39 -08:00

57 lines
1.5 KiB
Makefile

check: autospec/*.py
@flake8 --max-line-length=199 --ignore=E722 $^
test_pkg_integrity:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_pkg_integrity.py
test_tarball:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_tarball.py
test_specfile:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_specfile.py
test_abireport:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_abireport.py
test_commitmessage:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_commitmessage.py
test_files:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_files.py
test_license:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_license.py
test_buildpattern:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_buildpattern.py
test_build:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_build.py
test_buildreq:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_buildreq.py
test_specdescription:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_specdescription.py
test_count:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_count.py
test_test:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_test.py
test_util:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_util.py
test_infile_parser:
PYTHONPATH=${CURDIR}/autospec python3 -m unittest discover -b -s tests -p 'test_infile_*'
test_general:
PYTHONPATH=${CURDIR}/autospec python3 tests/test_general.py
unittests:
PYTHONPATH=${CURDIR}/autospec coverage run -m unittest discover -b -s tests -p 'test_*.py' && coverage report
coverage:
coverage report -m