Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated 'python setup.py test' support #4948

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Changes from 1 commit
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
26 changes: 0 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from contextlib import contextmanager
import os
from shutil import copyfile
import sys
Expand All @@ -8,30 +7,6 @@
from setuptools.command.develop import develop as develop_cmd


@contextmanager
def temporary_path(directory):
"""
Context manager that adds and subsequently removes the given directory
to sys.path

"""
sys.path.insert(0, directory)
try:
yield
finally:
del sys.path[0]


# Add full path so Python doesn't load any __init__.py in the intervening
# directories, thereby saving setup.py from additional dependencies.
with temporary_path("lib/iris/tests/runner"):
from _runner import TestRunner # noqa:


class SetupTestRunner(TestRunner, Command):
pass


class BaseCommand(Command):
"""A valid no-op command for setuptools & distutils."""

Expand Down Expand Up @@ -108,7 +83,6 @@ def run(self):


custom_commands = {
"test": SetupTestRunner,
"develop": custom_cmd(develop_cmd, [build_std_names]),
"build_py": custom_cmd(build_py, [build_std_names, copy_copyright]),
"std_names": custom_cmd(
Expand Down