diff options
| author | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-08-16 12:34:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-16 12:34:46 +0000 |
| commit | f991fbb3c9d0e10a0a78ae2b508b3fd99f9cdef2 (patch) | |
| tree | a044b31a3276cc4a51b7fc23776a32b380562bad /setuptools/tests/test_config.py | |
| parent | 4eb5b32f8d8bb1e20907028a516346e2b1901391 (diff) | |
| parent | 45e0ea0ff10a64f315a5c65b6805327222e5b565 (diff) | |
| download | python-setuptools-git-f991fbb3c9d0e10a0a78ae2b508b3fd99f9cdef2.tar.gz | |
Merge pull request #2332 from pypa/debt/cleanup-py2
Remove legacy Python 2 code
Diffstat (limited to 'setuptools/tests/test_config.py')
| -rw-r--r-- | setuptools/tests/test_config.py | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 67992c04..1dee1271 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import contextlib +import configparser import pytest @@ -9,9 +7,6 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError from mock import patch from setuptools.dist import Distribution, _Distribution from setuptools.config import ConfigHandler, read_configuration -from setuptools.extern.six.moves import configparser -from setuptools.extern import six -from . import py2_only, py3_only from .textwrap import DALS @@ -311,10 +306,6 @@ class TestMetadata: with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' - if six.PY2: - # static version loading is unsupported on Python 2 - return - config.write( '[metadata]\n' 'version = attr: fake_package.subpkg_b.mod.VERSION\n' @@ -719,19 +710,6 @@ class TestOptions: assert set(dist.packages) == set( ['fake_package', 'fake_package.sub_two']) - @py2_only - def test_find_namespace_directive_fails_on_py2(self, tmpdir): - dir_package, config = fake_env( - tmpdir, - '[options]\n' - 'packages = find_namespace:\n' - ) - - with pytest.raises(DistutilsOptionError): - with get_dist(tmpdir) as dist: - dist.parse_config_files() - - @py3_only def test_find_namespace_directive(self, tmpdir): dir_package, config = fake_env( tmpdir, |
