-
-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No coverage reports created when running mypy with input file #1845
Comments
Could you provide more detail about what you did? Specifically:
), so precision is important here. |
I'm sorry, of course the command i used to install mypy was Here is what I do precisely: The commit shown using I installed coverage, using pip in the same virtual environment venv, (command: I though I had seen the error you described and maybe had done something earlier on, to fix it. However using a different computer everything worked the same, as I described. |
Thanks, I certainly see what you're talking about. Here's how I reproduced it on recent MacOS:
|
Ok, using your procedure is was able to create a very similar bug:
It is not exactly the same error, but maybe my fix still applies. If I just get one more directory up, create
This is also the case when I specify an Outfile:
Normaly coverage warns that no data was collected, but that is also not the case here. Hopefully this is useful in recreating the bug. (editet because I missed that the command |
Furthermore when I run:
now there is a coverage file. |
Any new information? |
Hello,
I am not that familiar with coverage.py, as I am only using it for part of an evaluation, but I ran into strange behavior and couldn't find anything related here or on stackoverflow. Hopefully I am not doing something completely wrong (or stupid).
- What happened:
I am trying to produce coverage reports for the mypy module, using generated inputs. The problem is whenever I run mypy with an input file no .coverage file is created, but otherwise (meaning no file given) a report is created.
- What you did:
I cloned the mypy repository (https://github.com/python/mypy) and installed it locally in a venv using the
pip -e .
command. I then run the commandcoverage run -m mypy foo.py
, withfoo.py
beeing an empty file (or containing real code, does not seem to matter) in some folder that is not a python project(for simplicity). Though mypy returns with exactly the same output as it does, when I runmypy foo.py
, no .coverage file is created.The weird thing is, when i run the command
coverage run -m mypy
(without the required file parameter) it as expected, returns the error:mypy: error: Missing target module, package, files, or command.
, however the .coverage file is created. This is also the case when I runcoverage run -m mypy --help
but I guess this is just for the same reason, as also no input file is given.- What kind of help you need:
Can you explain to me, why no coverage file is created under this circumstance or how I can get coverage reports for the mypy module when inserting python files?
The text was updated successfully, but these errors were encountered: