diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-09-27 14:24:22 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-09-27 14:24:22 -0500 |
commit | 66a6724da8eda3336643dee086da2a3495e6422a (patch) | |
tree | 64043e9782491bde3a3a9ae2314cc59451a6c9c0 /pkg_resources/tests/test_pkg_resources.py | |
parent | df3905616933c90af95e99f705b800a2f5c1c921 (diff) | |
parent | 35ea365b50bd1a64375fdbcce187affab22af3b7 (diff) | |
download | python-setuptools-git-setuptools-scm.tar.gz |
Merge with mastersetuptools-scm
Diffstat (limited to 'pkg_resources/tests/test_pkg_resources.py')
-rw-r--r-- | pkg_resources/tests/test_pkg_resources.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py index 8b276ffc..361fe657 100644 --- a/pkg_resources/tests/test_pkg_resources.py +++ b/pkg_resources/tests/test_pkg_resources.py @@ -24,6 +24,7 @@ try: except NameError: unicode = str + def timestamp(dt): """ Return a timestamp for a local, naive datetime instance. @@ -34,13 +35,16 @@ def timestamp(dt): # Python 3.2 and earlier return time.mktime(dt.timetuple()) + class EggRemover(unicode): + def __call__(self): if self in sys.path: sys.path.remove(self) if os.path.exists(self): os.remove(self) + class TestZipProvider(object): finalizers = [] @@ -94,7 +98,9 @@ class TestZipProvider(object): assert f.read() == 'hello, world!' manager.cleanup_resources() + class TestResourceManager(object): + def test_get_cache_path(self): mgr = pkg_resources.ResourceManager() path = mgr.get_cache_path('foo') @@ -107,6 +113,7 @@ class TestIndependence: """ Tests to ensure that pkg_resources runs independently from setuptools. """ + def test_setuptools_not_imported(self): """ In a separate Python environment, import pkg_resources and assert @@ -122,7 +129,6 @@ class TestIndependence: subprocess.check_call(cmd) - class TestDeepVersionLookupDistutils(object): @pytest.fixture |