diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-09-23 17:26:24 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-09-23 17:26:34 -0400 |
commit | 8cca69b8ffd372ce5e3089cebbdbf92c071f3761 (patch) | |
tree | 6300de4fda7c64f81ecc98e54c1ca3e3ea9bd5d5 /setuptools/tests/test_dist.py | |
parent | f852d1598a7814f5f4f6e8bf26d3d60cffe1798a (diff) | |
parent | 662816b65fbbfaf4e8ff523e39a6034785a4d8eb (diff) | |
download | python-setuptools-git-feature/2093-docs-revamp.tar.gz |
Merge branch 'master' into feature/2093-docs-revampfeature/2093-docs-revamp
Diffstat (limited to 'setuptools/tests/test_dist.py')
-rw-r--r-- | setuptools/tests/test_dist.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py index 531ea1b4..cb47fb58 100644 --- a/setuptools/tests/test_dist.py +++ b/setuptools/tests/test_dist.py @@ -1,11 +1,9 @@ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - import io import collections import re import functools +import urllib.request +import urllib.parse from distutils.errors import DistutilsSetupError from setuptools.dist import ( _get_unpatched, @@ -14,9 +12,6 @@ from setuptools.dist import ( ) from setuptools import sic from setuptools import Distribution -from setuptools.extern.six.moves.urllib.request import pathname2url -from setuptools.extern.six.moves.urllib_parse import urljoin -from setuptools.extern import six from .textwrap import DALS from .test_easy_install import make_nspkg_sdist @@ -29,7 +24,8 @@ def test_dist_fetch_build_egg(tmpdir): Check multiple calls to `Distribution.fetch_build_egg` work as expected. """ index = tmpdir.mkdir('index') - index_url = urljoin('file://', pathname2url(str(index))) + index_url = urllib.parse.urljoin( + 'file://', urllib.request.pathname2url(str(index))) def sdist_with_index(distname, version): dist_dir = index.mkdir(distname) @@ -63,8 +59,7 @@ def test_dist_fetch_build_egg(tmpdir): dist.fetch_build_egg(r) for r in reqs ] - # noqa below because on Python 2 it causes flakes - assert [dist.key for dist in resolved_dists if dist] == reqs # noqa + assert [dist.key for dist in resolved_dists if dist] == reqs def test_dist__get_unpatched_deprecated(): @@ -150,10 +145,7 @@ def test_read_metadata(name, attrs): dist_class = metadata_out.__class__ # Write to PKG_INFO and then load into a new metadata object - if six.PY2: - PKG_INFO = io.BytesIO() - else: - PKG_INFO = io.StringIO() + PKG_INFO = io.StringIO() metadata_out.write_pkg_file(PKG_INFO) |