summaryrefslogtreecommitdiff
path: root/tests/test_summary.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_summary.py')
-rw-r--r--tests/test_summary.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py
index f8426779..d61c1bf4 100644
--- a/tests/test_summary.py
+++ b/tests/test_summary.py
@@ -230,6 +230,27 @@ class SummaryTest(CoverageTest):
self.assertIn("TheCode", report)
self.assertNotIn("thecode", report)
+ if sys.platform == 'win32':
+ def test_pyw_files(self):
+ # https://bitbucket.org/ned/coveragepy/issue/261
+ self.make_file("start.pyw", """\
+ import mod
+ print("In start.pyw")
+ """)
+ self.make_file("mod.pyw", """\
+ print("In mod.pyw")
+ """)
+ cov = coverage.coverage()
+ cov.start()
+ import start # pragma: nested
+ cov.stop() # pragma: nested
+
+ report = self.get_report(cov)
+ self.assertNotIn("NoSource", report)
+ report = report.splitlines()
+ self.assertIn("start 2 0 100%", report)
+ self.assertIn("mod 1 0 100%", report)
+
class SummaryTest2(CoverageTest):
"""Another bunch of summary tests."""