summaryrefslogtreecommitdiff
path: root/test/test_coverage.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-03-14 20:19:28 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-03-14 20:19:28 -0400
commit704129df336b024c4a36d5eb15adf6bfbadaf824 (patch)
treeaf9d724229139652bd445bfbfd62514d0ac99dc3 /test/test_coverage.py
parent9f1bd0d0b349a3daf0079358229a23c5ebb9e43a (diff)
downloadpython-coveragepy-git-704129df336b024c4a36d5eb15adf6bfbadaf824.tar.gz
Remove obsolete test infrastructure that the farm took over.
Diffstat (limited to 'test/test_coverage.py')
-rw-r--r--test/test_coverage.py32
1 files changed, 1 insertions, 31 deletions
diff --git a/test/test_coverage.py b/test/test_coverage.py
index 272a2d97..3fe3fe42 100644
--- a/test/test_coverage.py
+++ b/test/test_coverage.py
@@ -69,22 +69,11 @@ class CoverageTest(unittest.TestCase):
return modname
def checkCoverage(self, text, lines, missing="", excludes=[], report=""):
- self.checkEverything(text=text, lines=lines, missing=missing, excludes=excludes, report=report)
-
- def checkEverything(self, text=None, file=None, lines=None, missing=None,
- excludes=[], report="", annfile=None):
- assert text or file
- assert not (text and file)
-
# We write the code into a file so that we can import it.
# coverage.py wants to deal with things as modules with file names.
modname = self.getModuleName()
- if text:
- self.makeFile(modname, text)
- elif file:
- p = path.path(self.olddir) / file
- p.copyfile(modname + '.py')
+ self.makeFile(modname, text)
# Start up coverage.py
coverage.erase()
@@ -128,25 +117,6 @@ class CoverageTest(unittest.TestCase):
rep = " ".join(frep.getvalue().split("\n")[2].split()[1:])
self.assertEqual(report, rep)
- if annfile:
- # Run annotate.
- coverage.annotate([modname+'.py'])
- expect = (path.path(self.olddir) / annfile).text()
- actual = path.path(modname + '.py,cover').text()
- # Write the actual results into a file for comparison.
- out = path.path(self.olddir) / (annfile + "_actual_%s%s" % (sys.version_info[:2]))
- # Check if the results are right
- if expect == actual:
- # They are right: delete the old test results if they are still
- # around.
- if out.exists():
- out.remove()
- else:
- # The results are wrong: write them out so we can diff them to
- # see what happened.
- out.write_text(actual)
- self.fail("Annotation is incorrect: %s" % out)
-
def assertRaisesMsg(self, excClass, msg, callableObj, *args, **kwargs):
""" Just like unittest.TestCase.assertRaises,
but checks that the message is right too.