nosetests --with-coverage seems not to work at all

Issue #490 invalid
Jonathan Block
created an issue

I'm getting very unpredictable behavior with code coverage and nose.

In Python 2.7, nosetests with coverage seems to not work at all. I have a directory called “foo” which contains an empy init.py file and a bar.py file that looks like this: https://bpaste.net/show/f571342dcf39 Next I create a unit test which imports the Baz class https://bpaste.net/show/ee1a3cd30a8f The output I’m getting makes no sense: https://bpaste.net/show/32991eb12ac9 It looks as if there is a “foo.py” file in the coverage report, but I have no such file. What am I doing wrong?

Comments (1)

  1. Ned Batchelder repo owner

    I believe this is a bug with the nose plugin. If you run your tests without the plugin (coverage run -m nose ...), you won't see the problem. If you find that it still does show a problem, please feel free to open a new issue with the details.

  2. Log in to comment