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

Print warning when running 'setup.py test' #548

Merged
merged 1 commit into from Dec 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion setup.py
Expand Up @@ -3,6 +3,7 @@
import os

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

from dateutil._version import VERSION

Expand All @@ -11,6 +12,13 @@

PACKAGES = find_packages(where='.', exclude=['dateutil.test'])


class Unsupported(TestCommand):
def run(self):
print("Running 'test' with setup.py is not supported. "
"Use 'pytest' or 'tox' to run the tests.")


setup(name="python-dateutil",
version=VERSION,
description="Extensions to the standard Python datetime module",
Expand Down Expand Up @@ -44,5 +52,8 @@
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries',
],
test_suite="dateutil.test"
test_suite="dateutil.test",
cmdclass={
"test": Unsupported
}
)