diff options
author | Matěj Cepl <mcepl@redhat.com> | 2014-02-11 09:34:59 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2014-02-13 02:01:54 +0100 |
commit | 23a64455b1d30b5ed71ac58cb786aeeb54f168c2 (patch) | |
tree | f736d340a7cf8e2ae69a10a851a1c7f003316a76 /setup.py | |
parent | 31152dadf548370abb25e93bbdf4359c8b155433 (diff) | |
download | gg_scraper-23a64455b1d30b5ed71ac58cb786aeeb54f168c2.tar.gz |
Fix setup.py.RunTests.run() to return proper exit code.
The previous situation didn't fail on Travis-CI.
But this does, so I had to include also a number of fixes for revealed
issues.
Fixing #314, #315, #316, and #317
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals +import sys from distutils.core import setup, Command try: import unittest2 as unittest @@ -25,7 +26,8 @@ class RunTests(Command): def run(self): tests = unittest.TestLoader().discover('test') runner = unittest.TextTestRunner(verbosity=2) - runner.run(tests) + res = runner.run(tests) + sys.exit(int(not res.wasSuccessful())) classifiers = [ |