Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/tox/_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,6 @@ def boolean(x):
return x.upper() in ("Y", "YES")


def suffix(x):
if not (x[0:1] == "." and len(x) > 1):
raise ValidationError("Please enter a file suffix, e.g. '.rst' or '.txt'.")
return x


def ok(x):
return x


def list_modificator(answer, existing=None):
if not existing:
existing = []
Expand Down
1 change: 0 additions & 1 deletion src/tox/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def _construct_default_factors(cpython_versions, pypy_versions, other_interprete

class PYTHON:
PY_FACTORS_RE = re.compile("^(?!py$)(py|pypy|jython)([2-9][0-9]?)?$")
PY_FACTORS_MAP = {"py": "python", "pypy": "pypy", "jython": "jython"}
CPYTHON_VERSION_TUPLES = [(2, 7), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8)]
PYPY_VERSION_TUPLES = [(2, 7), (3, 5)]
OTHER_PYTHON_INTERPRETERS = ["jython"]
Expand Down
4 changes: 0 additions & 4 deletions src/tox/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ def __str__(self):
return exit_code_str(self.__class__.__name__, self.command, self.exit_code)


class MissingFile(Error):
"""An error while invoking a script."""


class MissingDirectory(Error):
"""A directory did not exist."""

Expand Down
4 changes: 0 additions & 4 deletions src/tox/interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ def __init__(self, executable, source, out, err):


class InterpreterInfo:
runnable = True

def __init__(self, name, executable, version_info, sysplatform):
assert executable and version_info
self.name = name
Expand All @@ -115,8 +113,6 @@ def __str__(self):


class NoInterpreterInfo:
runnable = False

def __init__(self, name, executable=None, out=None, err="not found"):
self.name = name
self.executable = executable
Expand Down
12 changes: 0 additions & 12 deletions src/tox/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ class Verbosity(object):


class Reporter(object):
actionchar = "-"

def __init__(self, session):
self.tw = py.io.TerminalWriter()
self.session = session
Expand Down Expand Up @@ -472,16 +470,6 @@ def cleanup(self):
tox_env.package.remove()
py.path.local(tox_env.package.dirname).remove(ignore_errors=True)

def _copyfiles(self, srcdir, pathlist, destdir):
for relpath in pathlist:
src = srcdir.join(relpath)
if not src.check():
self.report.error("missing source file: {}".format(src))
raise SystemExit(1)
target = destdir.join(relpath)
target.dirpath().ensure(dir=1)
src.copy(target)

def make_emptydir(self, path):
if path.check():
self.report.info(" removing {}".format(path))
Expand Down
9 changes: 0 additions & 9 deletions src/tox/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pipes
import re
import sys
import warnings
from itertools import chain

import py
Expand Down Expand Up @@ -244,14 +243,6 @@ def _getliveconfig(self):
alwayscopy,
)

def _getresolvedeps(self):
warnings.warn(
"that's a private function there, use get_resolved_dependencies,"
"this will be removed in 3.2",
category=DeprecationWarning,
)
return self.get_resolved_dependencies()

def get_resolved_dependencies(self):
dependencies = []
for dependency in self.envconfig.deps:
Expand Down
11 changes: 2 additions & 9 deletions tests/unit/test_interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class envconfig:
info = interpreters.get_info(envconfig)
assert info.version_info == tuple(sys.version_info)
assert info.executable == sys.executable
assert info.runnable
assert isinstance(info, InterpreterInfo)

def test_get_executable_no_exist(self, interpreters):
class envconfig:
Expand All @@ -148,7 +148,7 @@ class envconfig:
assert not info.version_info
assert info.name == "1lkj23"
assert not info.executable
assert not info.runnable
assert isinstance(info, NoInterpreterInfo)

def test_get_sitepackagesdir_error(self, interpreters):
class envconfig:
Expand Down Expand Up @@ -179,9 +179,6 @@ def info(
):
return InterpreterInfo(name, executable, version_info, sysplatform)

def test_runnable(self):
assert self.info().runnable

@pytest.mark.parametrize("missing_arg", ("executable", "version_info"))
def test_assert_on_missing_args(self, missing_arg):
with pytest.raises(AssertionError):
Expand All @@ -200,10 +197,6 @@ def test_str(self):


class TestNoInterpreterInfo:
def test_runnable(self):
assert not NoInterpreterInfo("foo").runnable
assert not NoInterpreterInfo("foo", executable=sys.executable).runnable

def test_default_data(self):
x = NoInterpreterInfo("foo")
assert x.name == "foo"
Expand Down