[Python-checkins] distutils2: Add tests to check initial contents of d2.database caches

eric.araujo python-checkins at python.org
Tue Nov 15 15:06:00 CET 2011


http://hg.python.org/distutils2/rev/a27a2a237231
changeset:   1254:a27a2a237231
user:        Éric Araujo <merwok at netwok.org>
date:        Tue Nov 15 11:30:16 2011 +0100
summary:
  Add tests to check initial contents of d2.database caches

files:
  distutils2/tests/test_database.py |  7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/distutils2/tests/test_database.py b/distutils2/tests/test_database.py
--- a/distutils2/tests/test_database.py
+++ b/distutils2/tests/test_database.py
@@ -12,6 +12,7 @@
 from distutils2.tests.test_util import GlobTestCaseBase
 from distutils2.tests.support import requires_zlib
 
+import distutils2.database
 from distutils2.config import get_resources_dests
 from distutils2.errors import PackagingError
 from distutils2.metadata import Metadata
@@ -293,6 +294,12 @@
         sys.path.insert(0, self.fake_dists_path)
         self.addCleanup(sys.path.remove, self.fake_dists_path)
 
+    def test_caches(self):
+        # sanity check for internal caches
+        for name in ('_cache_name', '_cache_name_egg',
+                     '_cache_path', '_cache_path_egg'):
+            self.assertEqual(getattr(distutils2.database, name), {})
+
     def test_distinfo_dirname(self):
         # Given a name and a version, we expect the distinfo_dirname function
         # to return a standard distribution information directory name.

-- 
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list