Kaydet (Commit) 618b7303 authored tarafından Éric Araujo's avatar Éric Araujo

Add tests to check initial content of packaging.database caches

üst e749e219
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment