summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-12-09 16:06:25 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-12-09 16:06:25 -0500
commitd513c39e96c3170aeb652cb3bee728b0bc124267 (patch)
tree1d299d88d74c9a2a05ab87e4011815ae9a726af6
parent5ae6f9404e83d411d3d5d6f7103d1c9d001d294b (diff)
downloadpython-coveragepy-git-d513c39e96c3170aeb652cb3bee728b0bc124267.tar.gz
Clean up from today's work
-rw-r--r--CHANGES.txt3
-rw-r--r--test/test_process.py15
2 files changed, 13 insertions, 5 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 369e3190..901a8dea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -5,6 +5,9 @@ Change history for Coverage.py
Version 3.6b2
-------------
+- Combining data files would create entries for phantom files if used with
+ ``source`` and path aliases. It no longer does.
+
- ``debug sys`` now shows the configuration file path that was read.
diff --git a/test/test_process.py b/test/test_process.py
index ac08d1fe..cfc5a926 100644
--- a/test/test_process.py
+++ b/test/test_process.py
@@ -1,6 +1,7 @@
"""Tests for process behavior of coverage.py."""
import glob, os, sys, textwrap
+from nose.plugins.skip import SkipTest
import coverage
sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
@@ -461,7 +462,7 @@ class ProcessStartupTest(CoverageTest):
def setUp(self):
super(ProcessStartupTest, self).setUp()
# Find a place to put a .pth file.
- for d in sys.path:
+ for d in sys.path: # pragma: part covered
g = glob.glob(os.path.join(d, "*.pth"))
if g:
pth_path = os.path.join(d, "subcover.pth")
@@ -470,11 +471,11 @@ class ProcessStartupTest(CoverageTest):
pth.write("import coverage; coverage.process_startup()\n")
self.pth_path = pth_path
break
- except (IOError, OSError):
+ except (IOError, OSError): # pragma: not covered
pass
finally:
pth.close()
- else:
+ else: # pragma: not covered
raise Exception("Couldn't find a place for the .pth file")
def tearDown(self):
@@ -483,6 +484,10 @@ class ProcessStartupTest(CoverageTest):
os.remove(self.pth_path)
def test_subprocess_with_pth_files(self):
+ if os.environ.get('COVERAGE_COVERAGE', ''):
+ raise SkipTest(
+ "Can't test subprocess pth file suppport during metacoverage"
+ )
# Main will run sub.py
self.make_file("main.py", """\
import os
@@ -499,10 +504,10 @@ class ProcessStartupTest(CoverageTest):
data_file = .mycovdata
""")
self.set_environ("COVERAGE_PROCESS_START", "coverage.ini")
- import main
+ import main # pylint: disable=F0401,W0612
self.assertEqual(open("out.txt").read(), "Hello, world!\n")
- # Read the data from .coverage
+ # Read the data from .coverage
data = coverage.CoverageData()
data.read_file(".mycovdata")
self.assertEqual(data.summary()['sub.py'], 3)