python - The six module is causing problems with test coverage using nosetests -


i'm using nosetests , coverage extension measure coverage of unit tests.

i've moved including six module package make easier users.

the problem having six locally seems mess coverage report.

i run tests this:

nosetests --cover-erase --with-coverage --cover-html --cover-package seaborn 

the report ends including references files aren't in directory tree:

name                    stmts   miss  cover   missing ----------------------------------------------------- configparser              391    391     0%   90-753 htmlparser                306    306     0%   11-472 queue                     125    125     0%   3-244 copy_reg                  105    105     0%   7-188 htmlentitydefs              9      9     0%   4-273 httplib                   704    704     0%   69-1342 repr                      103    103     0%   3-132 seaborn                     9      0   100% <...> 

the reason think six causing problem when search names, appear in six.py:

$ git grep configparser seaborn/external/six.py:    movedmodule("configparser", "configparser"),  $ git grep copy_reg seaborn/external/six.py:    movedmodule("copyreg", "copy_reg"), 

at no point in code import * six, of imports specific, from .external.six.moves import range

how can exclude these objects/files coverage report?

i've tried adding omit = seaborn/external .coveragerc (under [run]), , excludes files in seaborn/external report, not names six seems defining.

put .coveragerc instead.

[run] include = seaborn/* 

documentation configuration - http://nedbatchelder.com/code/coverage/config.html#config


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -