summaryrefslogtreecommitdiff
path: root/test/test_summary.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-11 12:22:03 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-11 12:22:03 -0500
commitde89438a0346e3dca4f7e8afe24efa38810deebe (patch)
tree82acb47b22bf967a9573651adb6cc18d9bc216a2 /test/test_summary.py
parent99480be7da89cb82cfff01e5d10a2514546faf39 (diff)
downloadpython-coveragepy-git-de89438a0346e3dca4f7e8afe24efa38810deebe.tar.gz
Windows now reports file names in their correct case. #89 and #203.
Diffstat (limited to 'test/test_summary.py')
-rw-r--r--test/test_summary.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_summary.py b/test/test_summary.py
index d2be95d9..4ca82656 100644
--- a/test/test_summary.py
+++ b/test/test_summary.py
@@ -179,6 +179,36 @@ class SummaryTest(CoverageTest):
self.assertEqual(self.line_count(report), 2)
+ def run_TheCode_and_report_it(self):
+ """A helper for the next few tests."""
+ cov = coverage.coverage()
+ cov.start()
+ import TheCode
+ cov.stop()
+
+ repout = StringIO()
+ cov.report(file=repout, show_missing=False)
+ report = repout.getvalue().replace('\\', '/')
+ report = re.sub(r"\s+", " ", report)
+ return report
+
+ def test_bug_203_mixed_case_listed_twice_with_rc(self):
+ self.make_file("TheCode.py", "a = 1\n")
+ self.make_file(".coveragerc", "[run]\nsource = .\n")
+
+ report = self.run_TheCode_and_report_it()
+
+ self.assertIn("TheCode", report)
+ self.assertNotIn("thecode", report)
+
+ def test_bug_203_mixed_case_listed_twice(self):
+ self.make_file("TheCode.py", "a = 1\n")
+
+ report = self.run_TheCode_and_report_it()
+
+ self.assertIn("TheCode", report)
+ self.assertNotIn("thecode", report)
+
class SummaryTest2(CoverageTest):
"""Another bunch of summary tests."""