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 and remove setuptools test command #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
27 changes: 0 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
import os
from os.path import dirname, realpath
import sys

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

from django_password_validators import __version__ as VERSION


class Tox(TestCommand):

def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)


__dir__ = realpath(dirname(__file__))

TESTS_REQUIRE = ['tox >= 4.11', 'bump-my-version >= 0.12']
@@ -69,9 +44,7 @@ def run_tests(self):
install_requires=[
'django >= 3.0',
],
tests_require=TESTS_REQUIRE,
extras_require={
'test': TESTS_REQUIRE,
},
cmdclass={'test': Tox},
)
Loading