Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
171 views

Sorry if the questions already been asked, but when using coverage.py to get Code Coverage reports, how do I get the coverage throughout mutliple test files? For example, if I had a directory ...
Quantalabs's user avatar
0 votes
2 answers
926 views

I have a bash script that runs my tests: #!/bin/bash coverage run --source='directory_for_coverage' manage.py test coverage report --fail-under=87 but when I run the script it only returns an error ...
wogsland's user avatar
  • 9,531
0 votes
0 answers
196 views

I have a method, which contains external rest-api calls. ex: def get_dataset(): url=requests.get("http://api:5001/get_trainingdata") filename=url.text[0] return filename When I ...
Dinesh Ghanta's user avatar
0 votes
1 answer
2k views

I using pytest and coverage modules for test cases and code coverage. From the project root, I'm able to execute pytest -v but not pytest -v --cov=./ (stack trace below) I set PYTHONPATH to the ...
Saurabh's user avatar
  • 7,156
0 votes
0 answers
891 views

I'm trying to integrate code coverage with Travis CI for a python repository. In the project root, my .coveragerc looks like: [run] data_file = tests/coverage/.coverage omit = data-structures/lib/* [...
Saurabh's user avatar
  • 7,156
0 votes
1 answer
713 views

My test code has some fails. But the pipeline ignores the error and runs successfully. How can I raise an error? azure-pipelines.yml ... - script: | pipenv run coverage run --rcfile=...
Joon's user avatar
  • 150
0 votes
0 answers
978 views

I want to measure the functional coverage of python programs. Reporting the line numbers of the function def lines. Can this be done using Ned Batchelder's Coverage.py? There's branch coverage which ...
Pie Tart's user avatar
0 votes
1 answer
2k views

Trying to fail Jenkins build even if one of the python test files has less than 80% coverage. Towards it, in Jenkins I'm using nosetests to run test coverage on 2 python test files. It prints results ...
Isaac Periyasamy's user avatar
0 votes
0 answers
643 views

I have a small Python 3 project that I intend to keep as a reusable library. Let's call it utils_common. The coverage report from coverage.py includes some coverage for actual unit tests code along "...
Andrei Rînea's user avatar
0 votes
1 answer
677 views

I am trying to send the coverage report generated after execution of test cases, which is generated in htmlcov folder, import os from django.conf import settings from utils import email_utils def ...
Junior's user avatar
  • 13
0 votes
1 answer
79 views

I have a python script that being run by a wrapper that is written in tcsh. I'm trying to use the Python Coverage.py module in order to collect coverage of the python script. I tried: coverage run ...
vesii's user avatar
  • 3,186
0 votes
1 answer
386 views

I have python 3.7.5 and Python 3.8 installed on the same windows 10 machine. They were both installed from python.org/downloads. When I run pip install coverage (using the latest release of pip) it ...
Andrew Gill's user avatar
0 votes
0 answers
1k views

I am trying to run coverage on a django project inside of a virtual environment and am having some issues with ModuleNotFoundError. As per this answer I have installed coverage inside of the virtual ...
omar_hussein's user avatar
0 votes
1 answer
373 views

Sample code: #!/usr/bin/env python import os import sys from coverage import Coverage class Cover_Diy(object): def cover_diy(self, cmd): if cmd == "hostname": os.system(cmd) ...
ted's user avatar
  • 1
0 votes
1 answer
29 views

I'm trying to use coverage.py on my unittest-based tests. I see that there are multiple kinds of paths and they're not collated, so the coverage data is wrong. /home/travis/virtualenv/python3.6.3/lib/...
Ark-kun's user avatar
  • 6,866
0 votes
1 answer
332 views

I have a Django project in which I can run coverage and create the report coverage run --source='.' manage.py test my_app I would like to compare the results over time after code refactors. Is there ...
jgmh's user avatar
  • 709
0 votes
1 answer
36 views

I contribute to scikit-image and was using coverage. Now, when I did coverage run benchmarks/benchmark_name.py and then generated the report, there were a lot of files that didn't have any link to ...
Abhishek Arya's user avatar
0 votes
1 answer
2k views

I have certain files in a directory named benchmarks and I want to get code coverage by running these source files. I have tried using source flag in the following ways but it doesn't work. coverage3 ...
Abhishek Arya's user avatar
0 votes
1 answer
659 views

When trying to compute coverage for a python project, I run into the following error: nose.plugins.xcover: ERROR: Coverage not available: unable to import coverage module This is the command I'm ...
Cyril's user avatar
  • 563
0 votes
1 answer
351 views

I want to exclude some abstract methods from code coverage and followed the suggestion of using an exception and a .coveragerc file as described here This method works fine, if I run coverage from ...
Cryn's user avatar
  • 1,035
0 votes
1 answer
565 views

I have run coverage on a project that I set up with cookie cutter for django. In the report, coverage includes the py files in the user app that cookie cutter set up for me, and includes my html ...
Rick Graves's user avatar
0 votes
0 answers
238 views

I have a few test files residing in test/ directory which has an __init__.py file. The test files are basically Python files but have the extension as .thpy (Python test files). Each of these tests ...
Nikhil Hegde's user avatar
0 votes
1 answer
217 views

I'm currently writing unit tests for Python, for this I'm using a combination of the built-in 'unittest' module and an external library called 'coverage'. When generating a report on windows, I get ...
Paradoxis's user avatar
  • 4,728
0 votes
1 answer
61 views

I'm using https://coverage.readthedocs.io/en/coverage-4.4.1/ to determine how much of a Python program I'm using. However, when I use command line: $coverage myprogram.py It runs the program in ...
bobsmith76's user avatar
0 votes
1 answer
91 views

I have an instance of Atlassian Bamboo running that calls and creates a code coverage website using the coverage.py script. it calls: coverage run $(which nosetests) --with-xunit $test_files ...
Michael WS's user avatar
  • 2,625
0 votes
0 answers
664 views

I use coverage API in WSGI project. When I not run test case,the coverage report reach 30%. So, I want to erase coverage data before run test case and also after start up WSGI project. I set a socket ...
crying_Dream's user avatar
0 votes
0 answers
405 views

I want to make a matrix that looks like the following Currently I'm trying to acquire the above matrix for Django test cases. However, coverage.py(the coverage tool that I'm using) doesn't seem to ...
user6851246's user avatar
0 votes
1 answer
563 views

I'm have the following script section in my .travis.yml file: script: # run all tests in mymodule/tests and check coverage of the mymodule dir # don't report on coverage of files in the mymodule/...
Jamie Bull's user avatar
  • 13.6k
0 votes
1 answer
613 views

I am using coverage in the following way to test my django app: DJANGO_SETTINGS_MODULE=$(SETTINGS) coverage run manage.py test -v 2 DJANGO_SETTINGS_MODULE=$(SETTINGS) coverage report In my test ...
oz123's user avatar
  • 29.1k
0 votes
0 answers
24 views

In my code I have: try: import json except ImportError: import simplejson as json Coverage says that the ImportError isn' tested. How do I go about writing a proper unittest to ...
NewGuy's user avatar
  • 3,473
0 votes
0 answers
86 views

Im using coverage to test a view that exports a xls file using report builder code. This is the view code : from report_builder.models import Report from report_utils.mixins import DataExportMixin, ...
jsanchezs's user avatar
  • 2,078
0 votes
1 answer
1k views

I'm attempting to use coverage.py to measure code coverage when running functional tests against a Flask server instance. It failed to detect the execution of several functions in a file that I know ...
Adam's user avatar
  • 3,778
0 votes
1 answer
437 views

I am building a python application in travis. I have setup.py which basically runs the command: py.test packageName when we do: setup.py test I am trying to run coverage plugin to push to ...
Scooby's user avatar
  • 3,641
0 votes
0 answers
199 views

Is there any way to configure PyDev's coverage.py integration to spit out a report with branch coverage? I see in the resulting command line in the run configuration, that Eclipse/plugins/org.python....
Manuel Leuenberger's user avatar
0 votes
1 answer
374 views

I'm trying to implement a test code coverage and I'm having problems with coveralls. For doing this i'm following this guide: https://github.com/coagulant/coveralls-python My problem is that when ...
Samuel Góngora's user avatar
0 votes
1 answer
633 views

I'm developing a Django reusable app. My development setup looks like this: ~/development/django-foo/ foo/ apps.py fixtures/ ... forms/ ... ...
Mischback's user avatar
  • 851
0 votes
0 answers
169 views

I'm using coverage.py to check the test/code coverage and it seems to consistently skip over any class methods. Is there a way to fix this?
user avatar
0 votes
2 answers
954 views

I have a django 1.6 project which have minimal test coverage when I run bash coverage run manage.py test mainapp coverage report --include=mainapp/* the output is Name Stmts Miss ...
Vaibhav Mishra's user avatar
0 votes
1 answer
134 views

Can anyone please tell how to find the coverage of django application deployed in apache.I want to hook in coverage.py in the deployed django application.
user3432569's user avatar
0 votes
1 answer
132 views

I have a GUI application that I am trying to determine what is being used and what isn't. I have a number of test suites that have to be run manually to test the user interface portions. Sometimes I ...
tgbrooks's user avatar
  • 311
-1 votes
1 answer
680 views

Hi i am reading a source and it has a line: fn = 'total-listmix-{}-{}.xml'.format(opt.os, opt.compiler) exept Exception as e: raise Exception('error merging coverage: {}'.format(e)) I think the {}...
Thanh Nguyen's user avatar
-1 votes
1 answer
157 views

I recently became the maintainer of PyPDF2, a library for reading / writing PDF files. In order to get more confident/quick with merging PRs, I introduced quite a lot of tests. I use pytest and ...
Martin Thoma's user avatar
-2 votes
1 answer
142 views

This is kind of an followup question to How do I interpret Python coverage.py branch coverage results? I have a different situation where I check a variable perr which has in different scenarios, ...
MaKaNu's user avatar
  • 1,076
-2 votes
1 answer
621 views

I wanted to use coveragepy combine to seperate .coverage files into one. For that I installed python and the coverage module via pip, afterwards then running this command. python -m coverage combine ....
NLion74's user avatar
  • 15
-3 votes
1 answer
238 views

I wrote code related to a website in python. Below is my file structure, ├── app_layer │   ├── src │   └── tests ├── core │   ├── src │   └── tests ├── model │   ├── src │   └── tests ├── .github │   ├...
rhar's user avatar
  • 9

1
7 8 9 10
11