python-coverage

Integrating command-line generated python .coverage files with PyDev

北城以北 提交于 2019-12-04 17:25:38
My build environment is configured to compile, run and create coverage file at the command line (using Ned Batchelder coverage.py tool). I'm using Eclipse with PyDev as my editor, but for practical reasons, it's not possible/convenient for me to convert my whole build environment to Eclipse (and thus generate the coverage data directly from the IDE, as it's designed to do) PyDev seems to be using the same coverage tool (or something very similar to it) to generate its coverage information, so I'm guessing there should be some way of integrating my external coverage files into Eclipse/PyDev.

preventing python coverage from including virtual environment site packages

狂风中的少年 提交于 2019-12-03 22:08:07
I am new to coverage and ran into a strange problem. My coverage is taking my virtual environment site packages into account. Here is the output of the coverage run: coverage run test.py .................... ---------------------------------------------------------------------- Ran 20 tests in 0.060s OK (atcatalog)- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -jmfrank63@fullstack-audio-text-catalog:~/workspace (git master) [19:58:45] $ coverage report Name Stmts Miss Cover ----------------------------------------------------------------------------------------------------

Running coverage inside virtualenv

时光总嘲笑我的痴心妄想 提交于 2019-11-30 11:49:13
I recently stumbled upon some issue with running coverage measurements within virtual environment. I do not remember similar issues in the past, nor I was able to find solution on the web. Basically, when I am trying to run test suite in virtualenv, it works fine. But as soon, as I try to do it using coverage , it fails because of lack of modules it requires. Based on some answer on StackOverflow I checked my script and found out that coverage uses different interpreter, even if running from inside the same virtualenv . Here is how to reproduce it: $ virtualenv --no-site-packages venv New

Running coverage inside virtualenv

陌路散爱 提交于 2019-11-29 11:50:10
问题 I recently stumbled upon some issue with running coverage measurements within virtual environment. I do not remember similar issues in the past, nor I was able to find solution on the web. Basically, when I am trying to run test suite in virtualenv, it works fine. But as soon, as I try to do it using coverage , it fails because of lack of modules it requires. Based on some answer on StackOverflow I checked my script and found out that coverage uses different interpreter, even if running from

Django coverage test for URLs 0%, why?

给你一囗甜甜゛ 提交于 2019-11-27 18:58:25
问题 Using Django Nose. I have tests for my URL's but coverage is still giving me 0% for URLs, why? python manage.py test profiles This is my coverage: Name Stmts Miss Cover Missing ---------------------------------------------------------------- profiles 0 0 100% profiles.migrations 0 0 100% profiles.migrations.0001_initial 6 0 100% profiles.models 0 0 100% profiles.urls 4 4 0% 1-9 ---------------------------------------------------------------- TOTAL 10 4 60% ------------------------------------