[Python-checkins] distutils2: Merge fixes from jkloth
tarek.ziade
python-checkins at python.org
Sat Oct 2 00:52:20 CEST 2010
tarek.ziade pushed 5a393dc99d6d to distutils2:
http://hg.python.org/distutils2/rev/5a393dc99d6d
changeset: 727:5a393dc99d6d
parent: 726:844e2164f861
parent: 725:ea3d00815339
user: ?ric Araujo <merwok at netwok.org>
date: Fri Oct 01 22:34:40 2010 +0200
summary: Merge fixes from jkloth
files: distutils2/_backport/tests/test_pkgutil.py, distutils2/tests/test_depgraph.py
diff --git a/distutils2/_backport/tests/test_pkgutil.py b/distutils2/_backport/tests/test_pkgutil.py
--- a/distutils2/_backport/tests/test_pkgutil.py
+++ b/distutils2/_backport/tests/test_pkgutil.py
@@ -39,10 +39,12 @@
super(TestPkgUtilData, self).setUp()
self.dirname = tempfile.mkdtemp()
sys.path.insert(0, self.dirname)
+ pkgutil.disable_cache()
def tearDown(self):
super(TestPkgUtilData, self).tearDown()
del sys.path[0]
+ pkgutil.enable_cache()
shutil.rmtree(self.dirname)
def test_getdata_filesys(self):
@@ -139,10 +141,12 @@
def setUp(self):
super(TestPkgUtilPEP302, self).setUp()
+ pkgutil.disable_cache()
sys.meta_path.insert(0, self.MyTestImporter())
def tearDown(self):
del sys.meta_path[0]
+ pkgutil.enable_cache()
super(TestPkgUtilPEP302, self).tearDown()
def test_getdata_pep302(self):
@@ -168,6 +172,7 @@
super(TestPkgUtilDistribution, self).setUp()
self.fake_dists_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), 'fake_dists'))
+ pkgutil.disable_cache()
self.distinfo_dirs = [os.path.join(self.fake_dists_path, dir)
for dir in os.listdir(self.fake_dists_path)
@@ -214,6 +219,7 @@
for distinfo_dir in self.distinfo_dirs:
record_file = os.path.join(distinfo_dir, 'RECORD')
open(record_file, 'w').close()
+ pkgutil.enable_cache()
super(TestPkgUtilDistribution, self).tearDown()
def test_instantiation(self):
@@ -322,6 +328,7 @@
def setUp(self):
super(TestPkgUtilPEP376, self).setUp()
+ pkgutil.disable_cache()
# Setup the path environment with our fake distributions
current_path = os.path.abspath(os.path.dirname(__file__))
self.sys_path = sys.path[:]
@@ -330,6 +337,7 @@
def tearDown(self):
sys.path[:] = self.sys_path
+ pkgutil.enable_cache()
super(TestPkgUtilPEP376, self).tearDown()
def test_distinfo_dirname(self):
diff --git a/distutils2/tests/test_depgraph.py b/distutils2/tests/test_depgraph.py
--- a/distutils2/tests/test_depgraph.py
+++ b/distutils2/tests/test_depgraph.py
@@ -32,6 +32,7 @@
path = os.path.abspath(path)
self.sys_path = sys.path[:]
sys.path[0:0] = [path]
+ pkgutil.disable_cache()
def test_generate_graph(self):
dists = []
@@ -177,6 +178,7 @@
def tearDown(self):
super(DepGraphTestCase, self).tearDown()
+ pkgutil.enable_cache()
sys.path = self.sys_path
def test_suite():
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list