summaryrefslogtreecommitdiff
path: root/pkg_resources/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-06-03 09:50:25 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-06-03 09:50:25 -0400
commitcca86c7f1d4040834c3265ccecdd9e21b4036df5 (patch)
tree6952f93a45a95659d36a93072e915688ca253a85 /pkg_resources/tests
parent7068f1d4c86e6d8e705a2b77da6c5dcf6a8d7bcd (diff)
downloadpython-setuptools-git-cca86c7f1d4040834c3265ccecdd9e21b4036df5.tar.gz
Use Python 3 syntax for new-style clasess
Diffstat (limited to 'pkg_resources/tests')
-rw-r--r--pkg_resources/tests/test_pkg_resources.py8
-rw-r--r--pkg_resources/tests/test_working_set.py4
2 files changed, 8 insertions, 4 deletions
diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py
index 7442b79f..079e83f8 100644
--- a/pkg_resources/tests/test_pkg_resources.py
+++ b/pkg_resources/tests/test_pkg_resources.py
@@ -23,6 +23,8 @@ try:
except NameError:
unicode = str
+__metaclass__ = type
+
def timestamp(dt):
"""
@@ -43,7 +45,7 @@ class EggRemover(unicode):
os.remove(self)
-class TestZipProvider(object):
+class TestZipProvider:
finalizers = []
ref_time = datetime.datetime(2013, 5, 12, 13, 25, 0)
@@ -132,7 +134,7 @@ class TestZipProvider(object):
manager.cleanup_resources()
-class TestResourceManager(object):
+class TestResourceManager:
def test_get_cache_path(self):
mgr = pkg_resources.ResourceManager()
path = mgr.get_cache_path('foo')
@@ -163,7 +165,7 @@ class TestIndependence:
subprocess.check_call(cmd)
-class TestDeepVersionLookupDistutils(object):
+class TestDeepVersionLookupDistutils:
@pytest.fixture
def env(self, tmpdir):
"""
diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py
index 42ddcc86..217edd8b 100644
--- a/pkg_resources/tests/test_working_set.py
+++ b/pkg_resources/tests/test_working_set.py
@@ -9,6 +9,8 @@ import pkg_resources
from .test_resources import Metadata
+__metaclass__ = type
+
def strip_comments(s):
return '\n'.join(
@@ -54,7 +56,7 @@ def parse_distributions(s):
yield dist
-class FakeInstaller(object):
+class FakeInstaller:
def __init__(self, installable_dists):
self._installable_dists = installable_dists