Skip to content

Commit 5c61694

Browse files
committed
Remove unused class TestUpgradeDistributeToSetuptools
Unused since 6b54145 when the last test method was removed. Removing the class avoids the need to add type annotations.
1 parent 48dc9f4 commit 5c61694

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

news/b27bb979-edeb-4ad2-ad20-1237de12968d.trivial.rst

Whitespace-only changes.

tests/functional/test_install_upgrade.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import itertools
22
import os
3-
import sys
43
import textwrap
54

65
import pytest
@@ -352,54 +351,6 @@ def test_upgrade_vcs_req_with_dist_found(script):
352351
assert "pypi.org" not in result.stdout, result.stdout
353352

354353

355-
class TestUpgradeDistributeToSetuptools:
356-
"""
357-
From pip1.4 to pip6, pip supported a set of "hacks" (see Issue #1122) to
358-
allow distribute to conflict with setuptools, so that the following would
359-
work to upgrade distribute:
360-
361-
``pip install -U setuptools``
362-
363-
In pip7, the hacks were removed. This test remains to at least confirm pip
364-
can upgrade distribute to setuptools using:
365-
366-
``pip install -U distribute``
367-
368-
The reason this works is that a final version of distribute (v0.7.3) was
369-
released that is simple wrapper with:
370-
371-
install_requires=['setuptools>=0.7']
372-
373-
The test use a fixed set of packages from our test packages dir. Note that
374-
virtualenv-1.9.1 contains distribute-0.6.34 and virtualenv-1.10 contains
375-
setuptools-0.9.7
376-
"""
377-
378-
def prep_ve(self, script, version, pip_src, distribute=False):
379-
self.script = script
380-
self.script.pip_install_local(f"virtualenv=={version}")
381-
args = ["virtualenv", self.script.scratch_path / "VE"]
382-
if distribute:
383-
args.insert(1, "--distribute")
384-
if version == "1.9.1" and not distribute:
385-
# setuptools 0.6 didn't support PYTHONDONTWRITEBYTECODE
386-
del self.script.environ["PYTHONDONTWRITEBYTECODE"]
387-
self.script.run(*args)
388-
if sys.platform == "win32":
389-
bindir = "Scripts"
390-
else:
391-
bindir = "bin"
392-
self.ve_bin = self.script.scratch_path / "VE" / bindir
393-
self.script.run(self.ve_bin / "pip", "uninstall", "-y", "pip")
394-
self.script.run(
395-
self.ve_bin / "python",
396-
"setup.py",
397-
"install",
398-
cwd=pip_src,
399-
expect_stderr=True,
400-
)
401-
402-
403354
@pytest.mark.parametrize(
404355
"req1, req2",
405356
list(

0 commit comments

Comments
 (0)