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 | fce62d380f82f6a650a8297341bff3044400b4f9 (patch) | |
tree | da3984e580bf6f57797c6aa2c192c33f1bf0db61 /test/test_api.py | |
parent | 6bac20d0a7a8815a7d1cf789642ba2342ae212ac (diff) | |
download | python-coveragepy-git-fce62d380f82f6a650a8297341bff3044400b4f9.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 35278e92..803ebfe3 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 """) |