Commit 31bd37c6 authored by stepshal's avatar stepshal

Fix quantity of blank lines.

parent f774a0be
......@@ -10,7 +10,6 @@ import sys
import textwrap
import subprocess
minimal_egg_info = textwrap.dedent("""
[distutils.commands]
egg_info = setuptools.command.egg_info:egg_info
......
......@@ -60,7 +60,6 @@ exclude_trees = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
......@@ -93,7 +92,6 @@ html_use_index = False
# Output file base name for HTML help builder.
htmlhelp_basename = 'Setuptoolsdoc'
# -- Options for LaTeX output --------------------------------------------------
# Grouping the document tree into LaTeX files. List of tuples
......
# coding: utf-8
"""
Package resource API
--------------------
......@@ -74,7 +73,6 @@ __import__('pkg_resources.extern.packaging.specifiers')
__import__('pkg_resources.extern.packaging.requirements')
__import__('pkg_resources.extern.packaging.markers')
if (3, 0) < sys.version_info < (3, 3):
msg = (
"Support for Python 3.0-3.2 has been dropped. Future versions "
......@@ -96,7 +94,6 @@ class PEP440Warning(RuntimeWarning):
class _SetuptoolsVersionMixin(object):
def __hash__(self):
return super(_SetuptoolsVersionMixin, self).__hash__()
......@@ -578,7 +575,6 @@ def get_entry_info(dist, group, name):
class IMetadataProvider:
def has_metadata(name):
"""Does the package's distribution contain the named metadata?"""
......@@ -2738,7 +2734,6 @@ class Distribution(object):
class EggInfoDistribution(Distribution):
def _reload_version(self):
"""
Packages installed by distutils (e.g. numpy or scipy),
......@@ -2825,7 +2820,6 @@ def issue_warning(*args, **kw):
class RequirementParseError(ValueError):
def __str__(self):
return ' '.join(self.args)
......@@ -2850,7 +2844,6 @@ def parse_requirements(strs):
class Requirement(packaging.requirements.Requirement):
def __init__(self, requirement_string):
"""DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
try:
......@@ -2906,8 +2899,10 @@ class Requirement(packaging.requirements.Requirement):
def _get_mro(cls):
"""Get an mro for a type or classic class"""
if not isinstance(cls, type):
class cls(cls, object):
pass
return cls.__mro__[1:]
return cls.__mro__
......
......@@ -18,7 +18,6 @@ import pytest
import pkg_resources
try:
unicode
except NameError:
......@@ -37,7 +36,6 @@ def timestamp(dt):
class EggRemover(unicode):
def __call__(self):
if self in sys.path:
sys.path.remove(self)
......@@ -100,7 +98,6 @@ class TestZipProvider(object):
class TestResourceManager(object):
def test_get_cache_path(self):
mgr = pkg_resources.ResourceManager()
path = mgr.get_cache_path('foo')
......@@ -130,13 +127,13 @@ class TestIndependence:
class TestDeepVersionLookupDistutils(object):
@pytest.fixture
def env(self, tmpdir):
"""
Create a package environment, similar to a virtualenv,
in which packages are installed.
"""
class Environment(str):
pass
......
......@@ -36,7 +36,6 @@ dist_from_fn = pkg_resources.Distribution.from_filename
class TestDistro:
def testCollection(self):
# empty path should produce no distributions
ad = pkg_resources.Environment([], platform=None, python=None)
......@@ -313,7 +312,6 @@ class TestDistro:
class TestWorkingSet:
def test_find_conflicting(self):
ws = WorkingSet([])
Foo = Distribution.from_filename("/foo_dir/Foo-1.2.egg")
......@@ -356,7 +354,6 @@ class TestWorkingSet:
class TestEntryPoints:
def assertfields(self, ep):
assert ep.name == "foo"
assert ep.module_name == "pkg_resources.tests.test_resources"
......@@ -457,7 +454,6 @@ class TestEntryPoints:
class TestRequirements:
def testBasics(self):
r = Requirement.parse("Twisted>=1.2")
assert str(r) == "Twisted>=1.2"
......@@ -538,7 +534,6 @@ class TestRequirements:
class TestParsing:
def testEmptyParse(self):
assert list(parse_requirements('')) == []
......@@ -701,6 +696,7 @@ class TestParsing:
value of parse_version. The new parse_version returns a Version class
which needs to support this behavior, at least for now.
"""
def buildout(parsed_version):
_final_parts = '*final-', '*final'
......@@ -709,6 +705,7 @@ class TestParsing:
if (part[:1] == '*') and (part not in _final_parts):
return False
return True
return _final_version(parsed_version)
assert buildout(parse_version("1.0"))
......
......@@ -10,7 +10,6 @@ import textwrap
import setuptools
here = os.path.dirname(__file__)
......@@ -97,11 +96,8 @@ setup_params = dict(
src_root=None,
packages=setuptools.find_packages(exclude=['*.tests']),
package_data=package_data,
py_modules=['easy_install'],
zip_safe=True,
entry_points={
"distutils.commands": [
"%(cmd)s = setuptools.command.%(cmd)s:%(cmd)s" % locals()
......@@ -141,12 +137,9 @@ setup_params = dict(
"dependency_links.txt = setuptools.command.egg_info:overwrite_arg",
],
"console_scripts": list(_gen_console_scripts()),
"setuptools.installation":
['eggsecutable = setuptools.command.easy_install:bootstrap'],
},
classifiers=textwrap.dedent("""
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
......
......@@ -102,7 +102,6 @@ class PackageFinder(object):
class PEP420PackageFinder(PackageFinder):
@staticmethod
def _looks_like_package(path):
return True
......
......@@ -10,7 +10,6 @@ from distutils.errors import DistutilsError
from pkg_resources import ensure_directory, ContextualZipFile
__all__ = [
"unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter",
"UnrecognizedFormat", "extraction_drivers", "unpack_directory",
......
......@@ -10,7 +10,6 @@ import sys
from setuptools.command import install_scripts
if 'egg' not in bdist.format_commands:
bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
bdist.format_commands.append('egg')
......
......@@ -429,10 +429,10 @@ def can_scan():
log.warn("Please ask the author to include a 'zip_safe'"
" setting (either True or False) in the package's setup.py")
# Attribute names of options for commands that might need to be convinced to
# install to the egg build directory
INSTALL_DIRECTORY_ATTRS = [
'install_lib', 'install_dir', 'install_data', 'install_base'
]
......
......@@ -2,7 +2,6 @@ import distutils.command.bdist_wininst as orig
class bdist_wininst(orig.bdist_wininst):
def reinitialize_command(self, command, reinit_subcommands=0):
"""
Supplement reinitialize_command to work around
......
......@@ -56,7 +56,6 @@ elif os.name != 'nt':
except ImportError:
pass
if_dl = lambda s: s if have_rtld else ''
......@@ -70,7 +69,6 @@ def get_abi3_suffix():
class build_ext(_build_ext):
def run(self):
"""Build extensions in build directory, then copy if --inplace"""
old_inplace, self.inplace = self.inplace, 0
......
#!/usr/bin/env python
"""
Easy Install
------------
......@@ -64,7 +63,6 @@ import pkg_resources
# Turn on PEP440Warnings
warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)
__all__ = [
'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
'main', 'get_exe_prefixes',
......@@ -92,6 +90,7 @@ def samefile(p1, p2):
if six.PY2:
def _to_ascii(s):
return s
......@@ -102,6 +101,7 @@ if six.PY2:
except UnicodeError:
return False
else:
def _to_ascii(s):
return s.encode('ascii')
......@@ -1632,7 +1632,6 @@ class PthDistributions(Environment):
class RewritePthDistributions(PthDistributions):
@classmethod
def _wrap_lines(cls, lines):
yield cls.prelude
......@@ -1837,6 +1836,7 @@ if '__pypy__' in sys.builtin_module_names:
_replace_zip_directory_cache_data = \
_remove_and_clear_zip_directory_cache_data
else:
def _replace_zip_directory_cache_data(normalized_path):
def replace_cached_zip_archive_directory_data(path, old_entry):
# N.B. In theory, we could load the zip directory information just
......@@ -2164,7 +2164,6 @@ class WindowsScriptWriter(ScriptWriter):
class WindowsExecutableLauncherWriter(WindowsScriptWriter):
@classmethod
def _get_script_args(cls, type_, name, header, script_text):
"""
......
......@@ -89,8 +89,10 @@ class sdist(sdist_add_defaults, orig.sdist):
"""
In a context, remove and restore os.link if it exists
"""
class NoValue:
pass
orig_val = getattr(os, 'link', NoValue)
try:
del os.link
......
......@@ -8,7 +8,6 @@ from setuptools.extern.six.moves import configparser
from setuptools import Command
__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
......
......@@ -17,7 +17,6 @@ from setuptools.py31compat import unittest_main
class ScanningLoader(TestLoader):
def loadTestsFromModule(self, module, pattern=None):
"""Return a suite of all tests cases contained in the given module
......@@ -50,7 +49,6 @@ class ScanningLoader(TestLoader):
# adapted from jaraco.classes.properties:NonDataProperty
class NonDataProperty(object):
def __init__(self, fget):
self.fget = fget
......
......@@ -26,7 +26,6 @@ def _have_cython():
# for compatibility
have_pyrex = _have_cython
_Extension = get_unpatched(distutils.core.Extension)
......
from pkg_resources.extern import VendorImporter
names = 'six',
VendorImporter(__name__, names, 'pkg_resources._vendor').install()
......@@ -14,6 +14,7 @@ from setuptools.extern.six import binary_type
__all__ = ["glob", "iglob", "escape"]
def glob(pathname, recursive=False):
"""Return a list of paths matching a pathname pattern.
......@@ -27,6 +28,7 @@ def glob(pathname, recursive=False):
"""
return list(iglob(pathname, recursive=recursive))
def iglob(pathname, recursive=False):
"""Return an iterator which yields the paths matching a pathname pattern.
......@@ -44,6 +46,7 @@ def iglob(pathname, recursive=False):
assert not s
return it
def _iglob(pathname, recursive):
dirname, basename = os.path.split(pathname)
if not has_magic(pathname):
......@@ -81,10 +84,12 @@ def _iglob(pathname, recursive):
for name in glob_in_dir(dirname, basename):
yield os.path.join(dirname, name)
# These 2 helper functions non-recursively glob inside a literal directory.
# They return a list of basenames. `glob1` accepts a pattern while `glob0`
# takes a literal basename (so it only has to check for its existence).
def glob1(dirname, pattern):
if not dirname:
if isinstance(pattern, binary_type):
......@@ -97,6 +102,7 @@ def glob1(dirname, pattern):
return []
return fnmatch.filter(names, pattern)
def glob0(dirname, basename):
if not basename:
# `os.path.split()` returns an empty basename for paths ending with a
......@@ -108,9 +114,11 @@ def glob0(dirname, basename):
return [basename]
return []
# This helper function recursively yields relative pathnames inside a literal
# directory.
def glob2(dirname, pattern):
assert _isrecursive(pattern)
yield pattern[:0]
......@@ -139,6 +147,7 @@ def _rlistdir(dirname):
magic_check = re.compile('([*?[])')
magic_check_bytes = re.compile(b'([*?[])')
def has_magic(s):
if isinstance(s, binary_type):
match = magic_check_bytes.search(s)
......@@ -146,12 +155,14 @@ def has_magic(s):
match = magic_check.search(s)
return match is not None
def _isrecursive(pattern):
if isinstance(pattern, binary_type):
return pattern == b'**'
else:
return pattern == '**'
def escape(pathname):
"""Escape all special characters.
"""
......
......@@ -15,7 +15,6 @@ import setuptools
class DistutilsRefactoringTool(RefactoringTool):
def log_error(self, msg, *args, **kw):
log.error(msg, *args)
......@@ -27,7 +26,6 @@ class DistutilsRefactoringTool(RefactoringTool):
class Mixin2to3(_Mixin2to3):
def run_2to3(self, files, doctests=False):
# See of the distribution option has been set, otherwise check the
# setuptools default.
......
......@@ -13,7 +13,6 @@ from setuptools.extern import six
import setuptools
__all__ = []
"""
Everything is private. Contact the project team
......
......@@ -34,11 +34,13 @@ else:
Mock winreg and environ so the module can be imported
on this platform.
"""
class winreg:
HKEY_USERS = None
HKEY_CURRENT_USER = None
HKEY_LOCAL_MACHINE = None
HKEY_CLASSES_ROOT = None
safe_env = dict()
try:
......@@ -458,6 +460,7 @@ class SystemInfo:
vc_ver: float
Required Microsoft Visual C++ version.
"""
# Variables and properties in this class use originals CamelCase variables
# names from Microsoft source files for more easy comparaison.
WinDir = safe_env.get('WinDir', '')
......
......@@ -47,7 +47,6 @@ __all__ = [
_SOCKET_TIMEOUT = 15
_tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
user_agent = _tmpl.format(py_major=sys.version[:3], **globals())
......@@ -198,9 +197,11 @@ def unique_values(func):
Wrap a function returning an iterable such that the resulting iterable
only ever yields unique items.
"""
@wraps(func)
def wrapper(*args, **kwargs):
return unique_everseen(func(*args, **kwargs))
return wrapper
......@@ -415,6 +416,7 @@ class PackageIndex(Environment):
def process_index(self, url, page):
"""Process the contents of a PyPI page"""
def scan(link):
# Process a URL to see if it's for a package page
if link.startswith(self.index_url):
......@@ -946,7 +948,9 @@ def socket_timeout(timeout=15):
return func(*args, **kwargs)
finally:
socket.setdefaulttimeout(old_timeout)
return _socket_timeout
return _socket_timeout
......@@ -991,7 +995,6 @@ class Credential(object):
class PyPIConfig(configparser.RawConfigParser):
def __init__(self):
"""
Load from ~/.pypirc
......
......@@ -23,9 +23,9 @@ def strip_fragment(url):
if sys.version_info >= (2, 7):
strip_fragment = lambda x: x
try:
from importlib import import_module
except ImportError:
def import_module(module_name):
return __import__(module_name, fromlist=['__name__'])
......@@ -13,5 +13,6 @@ def get_all_headers(message, key):
if sys.version_info < (3,):
def get_all_headers(message, key):
return message.getheaders(key)
......@@ -14,6 +14,7 @@ except ImportError:
raise ValueError("Name must be purelib or platlib")
return get_python_lib(name == 'platlib')
try:
# Python >=3.2
from tempfile import TemporaryDirectory
......
......@@ -99,6 +99,7 @@ class UnpickleableException(Exception):
"""
An exception representing another Exception that could not be pickled.
"""
@staticmethod
def dump(type, exc):
"""
......@@ -243,6 +244,7 @@ def run_setup(setup_script, args):
def runner():
ns = dict(__file__=setup_script, __name__='__main__')
_execfile(setup_script, ns)
DirectorySandbox(setup_dir).run(runner)
except SystemExit as v:
if v.args and v.args[0]:
......@@ -301,6 +303,7 @@ class AbstractSandbox:
if self._active:
path = self._remap_input(name, path, *args, **kw)
return original(path, *args, **kw)
return wrap
if _file:
......@@ -322,6 +325,7 @@ class AbstractSandbox:
path = self._remap_input(name, path, *args, **kw)
return self._remap_output(name, original(path, *args, **kw))
return original(path, *args, **kw)
return wrap
for name in ['readlink', 'tempnam']:
......@@ -336,6 +340,7 @@ class AbstractSandbox:
if self._active:
return self._remap_output(name, retval)
return retval
return wrap
for name in ['getcwd', 'tmpnam']:
......@@ -404,6 +409,7 @@ class DirectorySandbox(AbstractSandbox):
raise SandboxViolation(operation, args, kw)
if _file:
def _file(self, path, mode='r', *args, **kw):
if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
self._violation("file", path, mode, *args, **kw)
......
......@@ -29,7 +29,6 @@ cert_paths = """
/etc/ssl/ca-bundle.pem
""".strip().split()
try:
HTTPSHandler = urllib.request.HTTPSHandler
HTTPSConnection = http_client.HTTPSConnection
......@@ -50,10 +49,13 @@ except ImportError:
match_hostname = None
if not CertificateError:
class CertificateError(ValueError):
pass
if not match_hostname:
def _dnsname_match(dn, hostname, max_wildcards=1):
"""Matching according to RFC 6125, section 6.4.3
......@@ -216,7 +218,6 @@ def get_win_certfile():
return None
class MyCertFile(CertFile):
def __init__(self, stores=(), certs=()):
CertFile.__init__(self)
for store in stores:
......
......@@ -42,7 +42,6 @@ needs_bytecode = pytest.mark.skipif(
class TestDepends:
def testExtractConst(self):
if not hasattr(dep, 'extract_constant'):
# skip on non-bytecode platforms
......@@ -123,7 +122,6 @@ class TestDepends:
class TestDistro:
def setup_method(self, method):
self.e1 = Extension('bar.ext', ['bar.c'])
self.e2 = Extension('c.y', ['y.c'])
......@@ -214,7 +212,6 @@ class TestDistro:
class TestFeatures:
def setup_method(self, method):
self.req = Require('Distutils', '1.0.3', 'distutils')
self.dist = makeSetup(
......@@ -292,7 +289,6 @@ class TestFeatures:
class TestCommandTests:
def testTestIsCommand(self):
test_cmd = makeSetup().get_command_obj('test')
assert (isinstance(test_cmd, distutils.cmd.Command))
......
......@@ -45,7 +45,6 @@ class IndexServer(BaseHTTPServer.HTTPServer):
class RequestRecorder(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
requests = vars(self.server).setdefault('requests', [])
requests.append(self)
......
......@@ -9,7 +9,6 @@ from setuptools.dist import Distribution
from . import contexts
SETUP_PY = """\
from setuptools import setup
......@@ -28,7 +27,6 @@ def setup_context(tmpdir):
class Test:
def test_bdist_egg(self, setup_context, user_override):
dist = Distribution(dict(
script_name='setup.py',
......
......@@ -10,7 +10,6 @@ from setuptools.extension import Extension
class TestBuildExt:
def test_get_ext_filename(self):
"""
Setuptools needs to give back the same
......
......@@ -13,7 +13,6 @@ from setuptools.command.develop import develop
from setuptools.dist import Distribution
from . import contexts
SETUP_PY = """\
from setuptools import setup
......
# -*- coding: utf-8 -*-
"""Easy install Tests
"""
from __future__ import absolute_import
......@@ -42,7 +41,6 @@ from .textwrap import DALS
class FakeDist(object):
def get_entry_map(self, group):
if group != 'console_scripts':
return {}
......@@ -60,7 +58,6 @@ SETUP_PY = DALS("""
class TestEasyInstallTest:
def test_install_site_py(self, tmpdir):
dist = Distribution()
cmd = ei.easy_install(dist)
......@@ -194,7 +191,6 @@ class TestEasyInstallTest:
class TestPTHFileWriter:
def test_add_from_cwd_site_sets_dirty(self):
'''a pth file manager should set dirty
if a distribution is in site but also the cwd
......@@ -328,13 +324,11 @@ def distutils_package():
class TestDistutilsPackage:
def test_bdist_egg_available_on_distutils_pkg(self, distutils_package):
run_setup('setup.py', ['bdist_egg'])
class TestSetupRequires:
def test_setup_requires_honors_fetch_params(self):
"""
When easy_install installs a source distribution which specifies
......@@ -623,7 +617,6 @@ class TestScriptHeader:
class TestCommandSpec:
def test_custom_launch_command(self):
"""
Show how a custom CommandSpec could be used to specify a #! executable
......@@ -659,7 +652,6 @@ class TestCommandSpec:
class TestWindowsScriptWriter:
def test_header(self):
hdr = ei.WindowsScriptWriter.get_script_header('')
assert hdr.startswith('#!')
......
......@@ -262,7 +262,6 @@ class TestEggInfo(object):
def _find_egg_info_files(self, root):
class DirList(list):
def __init__(self, files, base):
super(DirList, self).__init__(files)
self.base = base
......
......@@ -38,7 +38,6 @@ def has_symlink():
class TestFindPackages:
def setup_method(self, method):
self.dist_dir = tempfile.mkdtemp()
self._make_pkg_structure()
......
......@@ -49,6 +49,7 @@ def install_context(request, tmpdir, monkeypatch):
user_base.remove()
user_site.remove()
install_dir.remove()
request.addfinalizer(fin)
# Change the environment and site settings to control where the
......
......@@ -30,7 +30,6 @@ SETUP_ATTRS = {
'packages': ['app'],
}
SETUP_PY = """\
from setuptools import setup
......@@ -95,7 +94,6 @@ def test_translated_pattern_test():
class TempDirTestCase(object):
def setup_method(self, method):
self.temp_dir = tempfile.mkdtemp()
self.old_cwd = os.getcwd()
......@@ -107,14 +105,12 @@ class TempDirTestCase(object):
class TestManifestTest(TempDirTestCase):
def setup_method(self, method):
super(TestManifestTest, self).setup_method(method)
f = open(os.path.join(self.temp_dir, 'setup.py'), 'w')
f.write(SETUP_PY)
f.close()
"""
Create a file tree like:
- LICENSE
......
......@@ -14,7 +14,6 @@ from .textwrap import DALS
class TestPackageIndex:
def test_regex(self):
hash_url = 'http://other_url?:action=show_md5&amp;'
hash_url += 'digest=0123456789abcdef0123456789abcdef'
......@@ -184,7 +183,6 @@ class TestPackageIndex:
class TestContentCheckers:
def test_md5(self):
checker = setuptools.package_index.HashChecker.from_url(
'http://foo/bar#md5=f12895fdffbd45007040d2e44df98478')
......@@ -219,7 +217,6 @@ class TestContentCheckers:
class TestPyPIConfig:
def test_percent_in_password(self, tmpdir, monkeypatch):
monkeypatch.setitem(os.environ, 'HOME', str(tmpdir))
pypirc = tmpdir / '.pypirc'
......
......@@ -11,7 +11,6 @@ from setuptools.sandbox import DirectorySandbox
class TestSandbox:
def test_devnull(self, tmpdir):
sandbox = DirectorySandbox(str(tmpdir))
sandbox.run(self._file_writer(os.devnull))
......@@ -21,6 +20,7 @@ class TestSandbox:
def do_write():
with open(path, 'w') as f:
f.write('xxx')
return do_write
def test_win32com(self, tmpdir):
......@@ -57,7 +57,6 @@ class TestSandbox:
class TestExceptionSaver:
def test_exception_trapped(self):
with setuptools.sandbox.ExceptionSaver():
raise ValueError("details")
......@@ -107,6 +106,7 @@ class TestExceptionSaver:
As revealed in #440, an infinite recursion can occur if an unpickleable
exception while setuptools is hidden. Ensure this doesn't happen.
"""
class ExceptionUnderTest(Exception):
"""
An unpickleable exception (not in globals).
......@@ -126,10 +126,12 @@ class TestExceptionSaver:
should reflect a proper exception and not be wrapped in
an UnpickleableException.
"""
def write_file():
"Trigger a SandboxViolation by writing outside the sandbox"
with open('/etc/foo', 'w'):
pass
sandbox = DirectorySandbox(str(tmpdir))
with pytest.raises(setuptools.sandbox.SandboxViolation) as caught:
with setuptools.sandbox.save_modules():
......
......@@ -20,10 +20,8 @@ from setuptools.command.egg_info import manifest_maker
from setuptools.dist import Distribution
from setuptools.tests import fail_on_ascii
py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only")
SETUP_ATTRS = {
'name': 'sdist_test',
'version': '0.0',
......@@ -31,14 +29,12 @@ SETUP_ATTRS = {
'package_data': {'sdist_test': ['*.txt']}
}
SETUP_PY = """\
from setuptools import setup
setup(**%r)
""" % SETUP_ATTRS
if six.PY3:
LATIN1_FILENAME = 'smörbröd.py'.encode('latin-1')
else:
......@@ -90,7 +86,6 @@ def read_all_bytes(filename):
class TestSdistTest:
def setup_method(self, method):
self.temp_dir = tempfile.mkdtemp()
f = open(os.path.join(self.temp_dir, 'setup.py'), 'w')
......
......@@ -70,7 +70,6 @@ def sample_test(tmpdir_cwd):
@pytest.mark.usefixtures('user_override')
@pytest.mark.usefixtures('sample_test')
class TestTestTest:
def test_test(self):
params = dict(
name='foo',
......
......@@ -10,7 +10,6 @@ from setuptools.dist import Distribution
from .textwrap import DALS
from . import contexts
SETUP_PY = DALS(
"""
from setuptools import setup
......@@ -38,7 +37,6 @@ def sample_project(tmpdir_cwd):
@pytest.mark.usefixtures('sample_project')
@pytest.mark.usefixtures('user_override')
class TestUploadDocsTest:
def test_create_zipfile(self):
"""
Ensure zipfile creation handles common cases, including a folder
......
......@@ -23,12 +23,10 @@ import pytest
from setuptools.command.easy_install import nt_quote_arg
import pkg_resources
pytestmark = pytest.mark.skipif(sys.platform != 'win32', reason="Windows only")
class WrapperTester:
@classmethod
def prep_script(cls, template):
python_exe = nt_quote_arg(sys.executable)
......
......@@ -25,6 +25,7 @@ def tempdir(func):
finally:
os.chdir(old_dir)
shutil.rmtree(test_dir)
return _tempdir
......
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