[py-svn] pytest-coverage commit 45329429a664: Merged with 96f47169f745

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Feb 25 15:25:09 CET 2010


# HG changeset patch -- Bitbucket.org
# Project pytest-coverage
# URL http://bitbucket.org/prologic/pytest-coverage/overview/
# User prologic
# Date 1267107771 -36000
# Node ID 45329429a664576b29f70da7b329a98b1f7d7b54
# Parent  96f47169f7458a1d29dc3a6c8a89c382df53e7c6
# Parent  2d667c92327901babf3ecfcdd78394876ae4e414
Merged with 96f47169f745

--- a/test_pytest_coverage.py
+++ b/test_pytest_coverage.py
@@ -12,8 +12,12 @@ def test_functional(testdir):
         def test_whatever():
             pass
         """)
-    result = testdir.runpytest('--cover-report=report')
+    result = testdir.runpytest('--cover=test_functional --cover-report=report')
     assert result.ret == 0
+    print
+    print type(result.stdout)
+    print repr(result.stdout)
+    print
     assert result.stdout.fnmatch_lines([
         '*Processing Coverage*',
         'test_functional*4*3*75%*',
@@ -30,7 +34,6 @@ def test_coverage_is_not_imported(testdi
     assert result.stdout.fnmatch_lines([
         '*1 passed*',
         ])
-    #print result.stdout.str()
 
 def test_cover_package(testdir):
     testdir.makepyfile("""
@@ -39,7 +42,8 @@ def test_cover_package(testdir):
         def test_whatever():
             pass
         """)
-    result = testdir.runpytest('--cover=test_cover_package',)
+    result = testdir.runpytest('--cover=test_cover_package',
+            '--cover-report=report')
     assert result.ret == 0
     assert result.stdout.fnmatch_lines([
         '*Processing Coverage*',

--- a/pytest_coverage.py
+++ b/pytest_coverage.py
@@ -23,7 +23,7 @@ def pytest_addoption(parser):
     group.addoption('--cover-directory', action='store', default=None,
             dest='directory', 
             help='Directory for the reports (html / annotate results) defaults to ./coverage')
-    group.addoption('--cover-show-missing', action='store', default=None,
+    group.addoption('--cover-show-missing', action='store_true', default=False,
             dest='show_missing',
             help='Show missing files')
     group.addoption('--cover-ignore-errors', action='store', default=None,



More information about the pytest-commit mailing list