Skip to content

Commit

Permalink
setup: Remove deprecated 'setup.py test' command.
Browse files Browse the repository at this point in the history
This was added in the first version of setup.py for the project. Since then,
setuptools has focused more on becoming a build tool (see eg.
pypa/setuptools#1684), and the project has developed a more refined testing
infrastructure which doesn't explicitly use this functionality.

If remaining, this code would require a noqa comment for compliance with the
incoming `N` set of linting rules, which is now no longer necessary.
  • Loading branch information
neiljp committed Feb 28, 2023
1 parent 96c5a52 commit 7d04271
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
import codecs
import os
import sys

from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand

from zulipterminal.version import ZT_VERSION


class PyTest(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ""

def run_tests(self):
import shlex

import pytest

errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)


def long_description():
if not (os.path.isfile("README.md") and os.access("README.md", os.R_OK)):
return ""
Expand Down Expand Up @@ -97,8 +79,6 @@ def long_description():
keywords="",
packages=find_packages(exclude=["tests", "tests.*"]),
zip_safe=True,
cmdclass={"test": PyTest},
test_suite="test",
entry_points={
"console_scripts": [
"zulip-term = zulipterminal.cli.run:main",
Expand Down

0 comments on commit 7d04271

Please sign in to comment.