summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-04-18 08:29:29 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-04-18 08:29:29 -0400
commitd6494281c9d75be742b19184816ec513fcc9b66a (patch)
treed05ffb49a14699465b445055309ec018225c7ab3
parent039a9c3c386e2c5959f0aa3fb03186b25e0bddb6 (diff)
downloadpython-coveragepy-git-d6494281c9d75be742b19184816ec513fcc9b66a.tar.gz
Remove the tests' dependence on the 3rd party path module.
-rw-r--r--test/coveragetest.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/coveragetest.py b/test/coveragetest.py
index cd91e199..5d84aedc 100644
--- a/test/coveragetest.py
+++ b/test/coveragetest.py
@@ -1,10 +1,8 @@
"""Base test case class for coverage testing."""
-import imp, os, random, sys, tempfile, textwrap, unittest
+import imp, os, random, shutil, sys, tempfile, textwrap, unittest
from cStringIO import StringIO
-import path # from http://www.jorendorff.com/articles/python/path/
-
import coverage
@@ -12,9 +10,9 @@ class CoverageTest(unittest.TestCase):
def setUp(self):
# Create a temporary directory.
self.noise = str(random.random())[2:]
- self.temproot = path.path(tempfile.gettempdir()) / 'test_coverage'
- self.tempdir = self.temproot / self.noise
- self.tempdir.makedirs()
+ self.temproot = os.path.join(tempfile.gettempdir(), 'test_coverage')
+ self.tempdir = os.path.join(self.temproot, self.noise)
+ os.makedirs(self.tempdir)
self.olddir = os.getcwd()
os.chdir(self.tempdir)
@@ -29,7 +27,7 @@ class CoverageTest(unittest.TestCase):
sys.path = self.oldsyspath
# Get rid of the temporary directory.
os.chdir(self.olddir)
- self.temproot.rmtree()
+ shutil.rmtree(self.temproot)
def makeFile(self, modname, text):
""" Create a temp file with modname as the module name, and text as the