diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-08 23:31:51 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-05-08 23:31:51 -0400 |
commit | 1180199850055ca2ee1368d3bd14c0c1d56d5c82 (patch) | |
tree | 191b0923329fc6106cccf7773032af0e3cb076a1 /test/test_api.py | |
parent | f71f94d6aa7b962a715652d2fc9fcdba3a35b97c (diff) | |
download | python-coveragepy-1180199850055ca2ee1368d3bd14c0c1d56d5c82.tar.gz |
makeFile is more useful if it doesn't append .py
Diffstat (limited to 'test/test_api.py')
-rw-r--r-- | test/test_api.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test_api.py b/test/test_api.py index 35278e9..803ebfe 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -12,7 +12,7 @@ class ApiTest(CoverageTest): def testSimple(self): coverage.erase() - self.makeFile("mycode", """\ + self.makeFile("mycode.py", """\ a = 1 b = 2 if b == 3: @@ -33,7 +33,7 @@ class ApiTest(CoverageTest): def doReportWork(self, modname): coverage.erase() - self.makeFile(modname, """\ + self.makeFile(modname+".py", """\ a = 1 b = 2 if b == 3: @@ -79,7 +79,7 @@ class ApiTest(CoverageTest): def testUnexecutedFile(self): cov = coverage.coverage() - self.makeFile("mycode", """\ + self.makeFile("mycode.py", """\ a = 1 b = 2 if b == 3: @@ -87,7 +87,7 @@ class ApiTest(CoverageTest): d = 5 """) - self.makeFile("not_run", """\ + self.makeFile("not_run.py", """\ fooey = 17 """) @@ -102,12 +102,12 @@ class ApiTest(CoverageTest): def testFileNames(self): - self.makeFile("mymain", """\ + self.makeFile("mymain.py", """\ import mymod a = 1 """) - self.makeFile("mymod", """\ + self.makeFile("mymod.py", """\ fooey = 17 """) @@ -145,13 +145,13 @@ class ApiTest(CoverageTest): self.assertEqual(os.path.basename(filename), "mymod.py") def testIgnoreStdLib(self): - self.makeFile("mymain", """\ + self.makeFile("mymain.py", """\ import mymod, colorsys a = 1 hls = colorsys.rgb_to_hls(1.0, 0.5, 0.0) """) - self.makeFile("mymod", """\ + self.makeFile("mymod.py", """\ fooey = 17 """) |