diff options
author | Miro HronĨok <miro@hroncok.cz> | 2018-09-09 19:49:33 +0200 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-09-13 12:52:56 -0400 |
commit | 26bc1710d11a7d35486b1c44a3523038ca5f1602 (patch) | |
tree | d5ddab113a1975f5b08a1e2b0f1a9e4f930c64ec /setup.py | |
parent | e122400568b9194362e33bd7260aeef404661218 (diff) | |
download | dateutil-git-26bc1710d11a7d35486b1c44a3523038ca5f1602.tar.gz |
setup.py test doesn't work, so exit with 1
The error message was printed, but the process exited with 0.
That is extremely error prone in automated environments.
Also, print the error message to standard error.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,6 +10,7 @@ from distutils.version import LooseVersion import warnings import io +import sys if isfile("MANIFEST"): os.unlink("MANIFEST") @@ -21,8 +22,9 @@ if LooseVersion(setuptools.__version__) <= LooseVersion("24.3"): class Unsupported(TestCommand): def run(self): - print("Running 'test' with setup.py is not supported. " - "Use 'pytest' or 'tox' to run the tests.") + sys.stderr.write("Running 'test' with setup.py is not supported. " + "Use 'pytest' or 'tox' to run the tests.\n") + sys.exit(1) ### |