Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
229 views

I'm using tox to run unit tests with pytest. When I run the tests with tox, it runs the tests and shows the tree of my src directory but prints CoverageWarning: No data was collected. (no-data-...
user1445709's user avatar
0 votes
0 answers
113 views

My code is importing several variables using os.environ. When I run 'coverage run' command for testing, it gives key error. Is there a way to provide env files to read env variables from there, or ...
Rishi's user avatar
  • 132
0 votes
1 answer
106 views

I have a workflow that looks like this: on: push: branches: - master jobs: git_pull: runs-on: self-hosted steps: - name: executing remote ssh commands uses: appleboy/...
Yee Bee's user avatar
0 votes
0 answers
35 views

I'm just learning django testing. When I use 'Coverage' module to check which parts of my code is tested, it considers almost all of class-based-views as tested while I have commented out all of my ...
mohsenof's user avatar
  • 115
0 votes
1 answer
57 views

I was using unittest in Django to write tests and running the tests with this command: coverage run --omit='src/manage.py,src/config/*,*/.venv/*,*/*__init__.py,*/tests.py,*/admin.py' src/manage.py ...
cheslijones's user avatar
  • 9,304
0 votes
1 answer
303 views

I'm interested in seeing what test triggers what code via the coverage tool. I followed the instruction https://coverage.readthedocs.io/en/latest/contexts.html#dynamic-contexts, to enable dynamic ...
Xiaoxuan Jin's user avatar
0 votes
1 answer
964 views

I'm baffled by differences in coverage behavior for different files in my project and hope someone will please suggest how to debug this more effectively than I am doing now. This is basically the ...
chrisinmtown's user avatar
  • 4,492
0 votes
1 answer
95 views

I have some code which uses a library that happens to use Cython under the hood. I'm observing that, following any call to a Cython function in that library, no lines in my own code are picked up as ...
alicederyn's user avatar
  • 13.3k
0 votes
1 answer
449 views

When running tests with coverage using PyCharm on django (python) project, im having the following error: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2023.1.2\...
Jorge Miguel Soares Lopes's user avatar
0 votes
0 answers
307 views

I am currently having two issues involving coverage/pytest and gitlab CI. The bigger and more recent one is that pytest and coverage do nothing at all when i call them in the gitlab CI. I do not get ...
J.N.'s user avatar
  • 360
0 votes
1 answer
52 views

I am trying to increase my coverage percentage on my coverage report and there is this method that I want to write a test case for using an **assert ** statement. It is only one line, but for my test ...
cc10's user avatar
  • 1
0 votes
0 answers
424 views

Python 3.10 I'm working on my first Python project and am confused by the following output when I run coverage run -m pytest followed by venv/bin/coverage report --show-missing. I'm specifically ...
Jesse C.'s user avatar
0 votes
1 answer
1k views

I have this python script snippet with mocked aws infrastructure for a todo list application: import os import boto3 import time import uuid import json import functools from botocore.exceptions ...
javier's user avatar
  • 1
0 votes
0 answers
147 views

I have written a small class and function and unit test case for them. from flask_restful import Resource class Calculator: def __init__(self, a, b ): self.a = a self.b = b ...
user3521180's user avatar
  • 1,160
0 votes
3 answers
639 views

I am trying to run python tests using coverage. However, when I try to run the command, the following error appears: $ python3 manage.py test Creating test database for alias 'default'... /workspace/....
megoverflow's user avatar
0 votes
2 answers
356 views

So I've been wanting to integrate code coverage in my tests and for that im using the coverage api. I have a exit handler which gets triggered on SIGINT, SIGTERM and SIGABRT signals: import logging ...
NLion74's user avatar
  • 15
0 votes
1 answer
182 views

As discussed here, code coverage tools do not work nicely with tensorflow due to its code transformation. One suggested workaround is to use tf.config.experimental_run_functions_eagerly(True) when ...
Uri Granta's user avatar
  • 1,984
0 votes
0 answers
283 views

I have a script 'interceptor.py' with a function def isIPValid(string): and a unit test script for pytest 'test_interceptor.py' with a test for this function: import interceptor def test_isIPValid():...
P Fernandez's user avatar
0 votes
0 answers
80 views

in my tests I did a coverage and I end up with untested parts inside an async with, what the coverage sees is the part about exceptions, my code is like this: @classmethod async def ...
Plaoo's user avatar
  • 460
0 votes
0 answers
144 views

I'm trying to run python coverage on an application that uses the gstreamer python bindings to create a pipeline and I'm not able to get it to report (or collect) coverage for the user defined ...
Oberluz's user avatar
  • 11
0 votes
1 answer
972 views

I have a python/flask application with a test suite. When I run coverage run -m pytest -s tests I get the following error: ImportError while loading conftest '/Users/abc/Documents/server/app/tests/...
sage76's user avatar
  • 1
0 votes
1 answer
150 views

Doing some testing on my own game that I am using to learn python. I am attempting some Code Coverage using the CoveragePY that I have installed via PyCharm's Package Manager. Wrote up my tests, right ...
user avatar
0 votes
1 answer
741 views

I am using the Python package in combination with the Django testing framework and sometimes want to test only one app/directory/package stated in the coverage --source option. coverage run --source='...
Matija Lukic's user avatar
0 votes
0 answers
40 views

Below my class I want to check class Toto: me = 0 def good(self): return "OK" With my test launch with pytest and pytest-cov plugin def test_attr_class(): assert Toto.me ...
general03's user avatar
  • 861
0 votes
0 answers
140 views

I am using coverage.py library for generating the code coverage report. But the issue is my coverage report is being split into different html files and they are not included in the **index.html** ...
Amritansh's user avatar
0 votes
1 answer
818 views

I need to cover only code that is called directly from test function, every nested method call must be marked as missed. This must help me ensure that every unit/method has his own test. Example: test ...
SanchosMine's user avatar
0 votes
1 answer
222 views

The problem is basically summed up by the title but simply put, I am implementing coverage requirements for a mono-repo codebase that is maintained by multiple teams. Contraints: All of our utilities ...
JaKeL's user avatar
  • 1
0 votes
0 answers
834 views

I have a python (Django) application for which I want to generate a code coverage report, but the solutions I have found on the internet mostly work with test runners or requires unit tests for ...
muhammad ashraf's user avatar
0 votes
1 answer
233 views

I have a post always step in Jenkinsfile that runs coverage report -m. The reason why it's in the post step is I want coverage report, regardless even if tests fail. I see that it's running but it's ...
Kyle's user avatar
  • 5,607
0 votes
0 answers
422 views

To learn about packaging, I've written a small script that converts a text string to Morse code. I have a function that opens a JSON file and returns the contents as a dictionary. This function passes ...
wcDogg's user avatar
  • 697
0 votes
0 answers
1k views

I have a basic Python project (Full repository HERE) with a tox.ini file which runs on 3.10. When run locally, all tests pass and coverage is at 100% When run on Github actions, the coverage is only ...
PirateApp's user avatar
  • 6,362
0 votes
1 answer
749 views

I'm porting some code from python2 to python3. Part of that is seeing how much our Flask-based REST API is covered by our automated tests, and deciding where, if anywhere, manual testing is needed. ...
dstromberg's user avatar
  • 7,243
0 votes
0 answers
295 views

Currently I am using coverage.py to get coverage report of python code. I am using --branch flag to get branch coverage in the report. In the html report header I am getting these attributes Module ...
Dev Env's user avatar
0 votes
1 answer
266 views

The coverage report only shows the percentage, and I would like to know all executed statements. Eventually, I need a map in which the key is the statement and the value is True(Executed)/False(Not ...
Sean's user avatar
  • 25
0 votes
0 answers
46 views

I'm starting to write unit tests for a django project, and running coverage shows I have 0% coverage over a simple list of tuples. Example: STATE_CHOICES = [ ("MO", "Missouri",)...
Jordan Renaud's user avatar
0 votes
2 answers
131 views

I am running coverage with this line, where $FILES is list of modified file in the current pull request. coverage run --include=$FILES -m pytest tests -vv -rf -x This works fine, however this is the ...
Bill Software Engineer's user avatar
0 votes
0 answers
747 views

I am testing a backend of Flask and MongoDB but run into a problem when running the total test suite. If I run certain files in the test suite independently, they work fine. I wrote a script which ...
Ben's user avatar
  • 61
0 votes
0 answers
344 views

It seems to me that we need to clean up the .coverage hidden files created by nosetest or else nosetest would be confused when I try to run it a second time. It may return cached results in the ....
user3240688's user avatar
  • 1,349
0 votes
0 answers
490 views

I'm using coverage.py tool https://coverage.readthedocs.io/en/stable/index.html to see code coverage of tests around a python project. I have 8 tests which may cover different files of the project , ...
Hamid Sayeed's user avatar
0 votes
0 answers
472 views

I am using coverage in python to run unit tests. I am using the below command for this -> coverage run --source . -m pytest --junitxml=unit_test_results.xml --disable-pytest-warnings --ignore=<...
Abinash Biswal's user avatar
0 votes
0 answers
95 views

What I did is: coverage run --source=HelloCNN1 test_hellocnn1.py coverage run --source=HelloCNN2 test_hellocnn2.py coverage combine coverage report -m --skip-empty The error output: (base) zz@home% ...
ChrisZZ's user avatar
  • 2,291
0 votes
0 answers
776 views

I have been adding type checking with MyPy to various python projects and I've found that doing so prevents Coverage from properly generating test coverage reports. Specifically it prevents coverage ...
axevalley's user avatar
  • 335
0 votes
1 answer
216 views

I am using pytest-cov for coverage checks on my repo. Is there a functionality by which I can specify coverage thresholds for a specific package/packages within a repository? Currently my coverage ...
Axxelerated's user avatar
0 votes
1 answer
448 views

Gitlab only provides to visualize the coverage.py report for the default branch using a hard-coded logic: https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-report-badge As I want to ...
Cord Kaldemeyer's user avatar
0 votes
1 answer
1k views

I have a project that is setup with the following minimal structure: workspace/ |- .venv/ # virtual environment |- .vscode/ # ide settings |- my.repo.folder/ # git repo. Note: these have periods ...
matt murray's user avatar
0 votes
1 answer
135 views

I've seen a couple of articles on the subject, but none seem to work for me. The case A Python package with tests based on unittest, pytest as test runner and plugins like pytest-cov to support the ...
Artur Barseghyan's user avatar
0 votes
0 answers
265 views

I am running tests on a project I've been assigned to. Everything is triggered by calling tox. Default tests run with nose, which adds a coverage report, this is the command that tox calls: django-...
Alvaro Rodriguez Scelza's user avatar
0 votes
1 answer
270 views

I'm running a set of tests with pytest and want also to measure its coverage with the coverage package. I have some decorators in my code, dividing the tests in several suites using something like: @...
Carabes's user avatar
  • 737
0 votes
0 answers
143 views

I have installed a third party wheel file and I implemented/used one of the classes & exceptions(from wheel) into my piece of code. I wrote some unit-test cases for my piece of code. I am able to ...
Uday Kumar's user avatar
0 votes
0 answers
393 views

I'm trying to get the executed code out of each Pytest Test case -in order to make a debuger-, now it's possible in Coverage module apis i will use the following code: cov.start() assert nrm.mySqrt(x)...
مهند حجي's user avatar

1
7 8 9
10
11