diff --git a/Makefile b/Makefile index 7f34b4a4..f93b1769 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7 @@ test-all: clean-pyc $(TOX) test: - $(PYTHON) setup.py test + $(PYTHON) -m $(PYTEST) cov: (cd $(TESTDIR); $(PYTEST) -x --cov="$(PROJ)" --cov-report=html) diff --git a/setup.py b/setup.py index 96d596f6..42dbe3e6 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,8 @@ import codecs import os import re -import sys import setuptools -import setuptools.command.test NAME = 'django-celery-beat' PACKAGE = 'django_celery_beat' @@ -103,19 +101,6 @@ def reqs(*f): # -*- %%% -*- - -class pytest(setuptools.command.test.test): - user_options = [('pytest-args=', 'a', 'Arguments to pass to pytest')] - - def initialize_options(self): - setuptools.command.test.test.initialize_options(self) - self.pytest_args = [] - - def run_tests(self): - import pytest - sys.exit(pytest.main(self.pytest_args)) - - setuptools.setup( name=NAME, packages=setuptools.find_packages(exclude=[ @@ -133,8 +118,6 @@ def run_tests(self): license='BSD', python_requires='>=3.8', install_requires=reqs('default.txt') + reqs('runtime.txt'), - tests_require=reqs('test.txt') + reqs('test-django.txt'), - cmdclass={'test': pytest}, classifiers=classifiers, entry_points={ 'celery.beat_schedulers': [ diff --git a/tox.ini b/tox.ini index d044e399..d812ee48 100644 --- a/tox.ini +++ b/tox.ini @@ -80,5 +80,5 @@ usedevelop = true commands = pip install --upgrade https://github.com/celery/celery/zipball/main#egg=celery pip install --upgrade https://github.com/celery/kombu/zipball/main#egg=kombu - pip install Django + pip install Django pytest pytest -x --cov=django_celery_beat --cov-report=xml --no-cov-on-fail