summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-11-14 18:43:37 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-11-14 18:43:37 (GMT)
commit618b73035a7f209de86d257f46c0a58ca221970b (patch)
tree270819fe7c9afe148b1286f7ce33c9a28d6d23f8 /Lib/packaging
parente749e21948ceef9ceef755d9b3d1c25c688fdc59 (diff)
downloadcpython-618b73035a7f209de86d257f46c0a58ca221970b.zip
cpython-618b73035a7f209de86d257f46c0a58ca221970b.tar.gz
cpython-618b73035a7f209de86d257f46c0a58ca221970b.tar.bz2
Add tests to check initial content of packaging.database caches
Diffstat (limited to 'Lib/packaging')
-rw-r--r--Lib/packaging/tests/test_database.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_database.py b/Lib/packaging/tests/test_database.py
index 6f63e19..ad91b94 100644
--- a/Lib/packaging/tests/test_database.py
+++ b/Lib/packaging/tests/test_database.py
@@ -10,6 +10,7 @@ from textwrap import dedent
from packaging.tests.test_util import GlobTestCaseBase
from packaging.tests.support import requires_zlib
+import packaging.database
from packaging.config import get_resources_dests
from packaging.errors import PackagingError
from packaging.metadata import Metadata
@@ -279,6 +280,12 @@ class TestDatabase(support.LoggingCatcher,
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(packaging.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.