diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-11 12:22:03 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-11 12:22:03 -0500 |
commit | fde676aeef895cfc028fd911ebd46e8f2d20e829 (patch) | |
tree | 3f6bc12f772817e49359ae2c690c6cabc362944f /test/test_summary.py | |
parent | 5fc7c53a6d94cacf7f7b5fb26013ea28017abbc4 (diff) | |
download | python-coveragepy-fde676aeef895cfc028fd911ebd46e8f2d20e829.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.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_summary.py b/test/test_summary.py index d2be95d..4ca8265 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.""" |