Commit 393809a0 authored by Jason R. Coombs's avatar Jason R. Coombs

Feed the hobgoblins (delint).

parent dd522e60
...@@ -11,7 +11,6 @@ import distutils.log ...@@ -11,7 +11,6 @@ import distutils.log
import distutils.core import distutils.core
import distutils.cmd import distutils.cmd
import distutils.dist import distutils.dist
from distutils.errors import DistutilsOptionError
from distutils.util import strtobool from distutils.util import strtobool
from distutils.debug import DEBUG from distutils.debug import DEBUG
from distutils.fancy_getopt import translate_longopt from distutils.fancy_getopt import translate_longopt
...@@ -135,7 +134,6 @@ def write_pkg_file(self, file): ...@@ -135,7 +134,6 @@ def write_pkg_file(self, file):
def write_field(key, value): def write_field(key, value):
file.write("%s: %s\n" % (key, value)) file.write("%s: %s\n" % (key, value))
write_field('Metadata-Version', str(version)) write_field('Metadata-Version', str(version))
write_field('Name', self.get_name()) write_field('Name', self.get_name())
write_field('Version', self.get_version()) write_field('Version', self.get_version())
...@@ -1281,4 +1279,5 @@ class Feature: ...@@ -1281,4 +1279,5 @@ class Feature:
class DistDeprecationWarning(SetuptoolsDeprecationWarning): class DistDeprecationWarning(SetuptoolsDeprecationWarning):
"""Class for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning.""" """Class for warning about deprecations in dist in
setuptools. Not ignored by default, unlike DeprecationWarning."""
...@@ -8,7 +8,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError ...@@ -8,7 +8,7 @@ from distutils.errors import DistutilsOptionError, DistutilsFileError
from mock import patch from mock import patch
from setuptools.dist import Distribution, _Distribution from setuptools.dist import Distribution, _Distribution
from setuptools.config import ConfigHandler, read_configuration from setuptools.config import ConfigHandler, read_configuration
from setuptools.extern.six.moves.configparser import InterpolationMissingOptionError from setuptools.extern.six.moves import configparser
from setuptools.tests import is_ascii from setuptools.tests import is_ascii
from . import py2_only, py3_only from . import py2_only, py3_only
from .textwrap import DALS from .textwrap import DALS
...@@ -29,7 +29,9 @@ def make_package_dir(name, base_dir, ns=False): ...@@ -29,7 +29,9 @@ def make_package_dir(name, base_dir, ns=False):
return dir_package, init_file return dir_package, init_file
def fake_env(tmpdir, setup_cfg, setup_py=None, encoding='ascii', package_path='fake_package'): def fake_env(
tmpdir, setup_cfg, setup_py=None,
encoding='ascii', package_path='fake_package'):
if setup_py is None: if setup_py is None:
setup_py = ( setup_py = (
...@@ -440,11 +442,12 @@ class TestMetadata: ...@@ -440,11 +442,12 @@ class TestMetadata:
'[metadata]\n' '[metadata]\n'
'description = %(message)s\n' 'description = %(message)s\n'
) )
with pytest.raises(InterpolationMissingOptionError): with pytest.raises(configparser.InterpolationMissingOptionError):
with get_dist(tmpdir): with get_dist(tmpdir):
pass pass
skip_if_not_ascii = pytest.mark.skipif(not is_ascii, reason='Test not supported with this locale') skip_if_not_ascii = pytest.mark.skipif(
not is_ascii, reason='Test not supported with this locale')
@skip_if_not_ascii @skip_if_not_ascii
def test_non_ascii_1(self, tmpdir): def test_non_ascii_1(self, tmpdir):
......
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