Skip to content

Commit

Permalink
Print warning when running setup.py test
Browse files Browse the repository at this point in the history
  • Loading branch information
lkollar committed Dec 6, 2017
1 parent 84623e0 commit 6e6b8f1
Showing 1 changed file with 12 additions and 1 deletion.
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
}
)

0 comments on commit 6e6b8f1

Please sign in to comment.