From de89438a0346e3dca4f7e8afe24efa38810deebe Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 11 Nov 2012 12:22:03 -0500 Subject: Windows now reports file names in their correct case. #89 and #203. --- test/test_summary.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'test') 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.""" -- cgit v1.2.1