Tagged Questions
0
votes
1answer
38 views
pytest and coverage combination does not work
I installed plugin for pytest from here:http://pypi.python.org/pypi/pytest-cov. Then I have a simple test code:
pytest.py:
class TestNumbers:
def test_int_float(self):
assert 1 == 1.0
...
1
vote
1answer
55 views
Is there any way to filter the coverage report in nose?
I'm using django-nose and it does generate a huge coverage report. I would like to filter its output, if possible.
Here is an example of the output:
(venv) ...
0
votes
1answer
38 views
How do I run python code-coverage on multiple platforms
I am using coverage.py on my code (python 2.7), inside PyDEV on Windows.
I have bits of code that run only on UNIX, usually starting with:
if os.name == 'posix':
and I want to make sure this is ...
0
votes
2answers
61 views
Why does nosetests say --with-coverage is not an option?
I am using nosetests to automatically discover and run my unittests. I would also like to have it generate coverage reports.
When I run nosetests with the following command everything works just fine
...
1
vote
1answer
164 views
Test/Test Coverage with Python in Sonar not showing up?
I'm running a pretty simple set of python projects through sonar-runner and am having issues getting tests to show up.
I'm running Sonar 3.2.1, with Python Plugin 1.1. The coverage report is ...
0
votes
1answer
45 views
gcovr - Is there a known issue with corrupting filenames in xml coverage Cobertura reports?
I'm working on a C++ project to integrate with gcovr coverage reports. I'm running into an issue where a pacakge entry is getting added to the gcovr report twice for the same file, which is causing an ...
0
votes
0answers
57 views
How to exclude a file from coverage.py?
I use nosetest's coverage.py plugin. Is it somehow possible to exclude entire files or folders from the coverage report? My use case is having an external library in my project folder that obviously ...
0
votes
1answer
237 views
How to exclude mock package from python coverage report using nosetests
I currently try to use the mock library to write some basic nose unittests in python.
After finishing some basic example I now tried to use nosetests --with-coverage and now I have the mock package ...
1
vote
1answer
89 views
Can't get Coverage to work in PyDev, “File has no statistics”
I can't get Coverage to work with PyDev. Every file I run shows up with: "File has no statistics."
I'm following the instructions by checking 'Enable code coverage for new launches', and dragging the ...
2
votes
1answer
187 views
How to install python's coverage module and use it from commandline in Windows
I want o learn how to use python's coverage.py module to inspect the coverage pattern of my code. I tried reading about the tool from various sources and finally installed it on my windows 7 machine ...
0
votes
1answer
210 views
'python setup.py nosetests' reports that package's __init__.py is not covered by tests
When I test https://bitbucket.org/petar/beam_integrals with python setup.py nosetests I get a 96% coverage:
----------------------------------------------------------------------
XML: nosetests.xml
...
1
vote
2answers
85 views
Increasing coverage with try-except-finally and a context-manager
This is the flow that I have in my program
277: try:
278: with open(r"c:\afile.txt", "w") as aFile:
...: pass # write data, other exceptions/errors can occur here that have to be handled by ...
1
vote
1answer
152 views
.coveragerc file location when running py.test
I am trying to get a pytest run to work with a coveragerc file. Settings in my .coveragerc file are not used, so I guess the file is not used at all.
See my project structure and pytest calls below! ...
2
votes
1answer
425 views
PyCharm, Django: zero code coverage
PyCharm has a "Run with Coverage" action for Django test targets. This runs the tests, but shows zero test coverage (0% files, not covered in the project pane, and all red in the editor). Checking or ...
1
vote
1answer
136 views
How do you properly restrict xcoverage package coverage in nosetests using setup.cfg?
I've configured it so my simple unit test passes. But nosexunit.xml is reporting on test lib files. Partial output:
nosexcover-1.0.7-py2.6.egg/nosexcover/nosexcover 25 24 4% 5-41, 46-56
...