Closed stevepiercy closed 4 years ago
Actually I won't make an attempt to fix compat. When I ran coverage with xml -i
, there were too many missed statements, and I should talk with someone before I fix something that ain't broke.
Lint is now passing. However the coverage report now shows two lines as misses.
try:
import configparser
except ImportError:
import ConfigParser as configparser
I checked both src/pyramid/compat.py
and tests/test_compat.py
, but I have no idea what is the proper way to get the missed statements have coverage.
Slap a # pragma: no cover
on the except
?
Perhaps a new test in tests/test_config/__init__.py
for configparser
?
The issue is that virtualenv
has pulled in configparser
from PyPI, which back ports the new configparser
from Python 3.x to Python 2.7.
We need to slap a pragma: no cover
on that. Previously on Python 2.7 configparser
would fail to import, and we would fall back to importing ConfigParser
.
Thanks for the assist @bertjwregeer !
This PR is not the cause of the build failure. I was going to merge, but reckon that y'all might want to take a look at what's going on with lint.
I'll try to fix the broken coverage in
pyramid.compat
.