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.
diff --git a/setup.py b/setup.py
index 78e66ea..f8317ce 100644
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,7 @@
import warnings
import io
+import sys
if isfile("MANIFEST"):
os.unlink("MANIFEST")
@@ -21,8 +22,9 @@
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)
###