#11 Coverage thinks we are missing two lines in fegistry/__init__.py
Closed 3 years ago Opened 3 years ago by bowlofeggs.

Coverage thinks we are missing two lines in fegistry/init.py:

[vagrant@fegistry fegistry]$ python3 setup.py nosetests
running nosetests
running egg_info
writing fegistry.egg-info/PKG-INFO
writing requirements to fegistry.egg-info/requires.txt
writing top-level names to fegistry.egg-info/top_level.txt
writing dependency_links to fegistry.egg-info/dependency_links.txt
reading manifest file 'fegistry.egg-info/SOURCES.txt'
writing manifest file 'fegistry.egg-info/SOURCES.txt'
...
Name                Stmts   Miss  Cover   Missing
-------------------------------------------------
fegistry.py             2      2     0%   16-21
fegistry/views.py       7      0   100%
-------------------------------------------------
TOTAL                   9      2    78%
nose.plugins.cover: ERROR: TOTAL Coverage did not reach minimum required: 100%

This is due to setup.py importing fegistry. It does this to determine the version. However, since setup.py does this before nose starts, the processing of __init__.py happens before coverage is observing it, and so coverage thinks that code was never executed.

Running the tests directly with nosetests-3 does work, but we should try to continue to support python3 setup.py nosetests.


@bowlofeggs changed the status to Closed

3 years ago

Login to comment on this ticket.

Metadata