Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleaning up hacky test runner slightly

  • Loading branch information...
commit 712ef8be868ea95c84abbcd76385960f83512a82 1 parent 14747dc
@maxcountryman maxcountryman authored
Showing with 13 additions and 9 deletions.
  1. +13 −9 setup.py
View
22 setup.py
@@ -9,26 +9,30 @@
dname = os.path.dirname(abspath)
os.chdir(dname)
- nosetests = 'nosetests -v --with-coverage --cover-package=rauth'
+ pyflakes = 'pyflakes rauth tests'
+ pep8 = 'pep8 rauth tests'
+ nosetests = ('nosetests -v --with-coverage --cover-package=rauth')
coverage = ('grep ^TOTAL test.log | grep 100% >/dev/null ||'
'{ echo \'\n\033[1m\033[91mFAILURE\033[0m: '
- 'Test coverage incomplete.\'&&'
- 'exit 1; }')
- tests = ('&& grep OK test.log >/dev/null || exit 1')
+ 'Test coverage incomplete.\'&& exit 1; }')
+ tests = ('grep OK test.log >/dev/null || exit 1')
+
try:
import yanc
nosetests += ' --with-yanc --yanc-color=on'
except ImportError:
pass
- status = os.system('pyflakes rauth tests; '
- 'pep8 rauth tests && '
- + nosetests + ' 2>&1 | tee -a test.log;'
- + coverage + tests)
+
+ nosetests += ' 2>&1 | tee -a test.log'
+
+ status = os.system(' && '.join([pyflakes, pep8, nosetests, coverage]))
+ status >>= 8
if os.path.isfile('test.log'):
+ if status == 0:
+ status = os.system(tests)
os.system('rm test.log')
- status >>= 8
sys.exit(status)
install_requires = ['requests>=0.12.0']
Please sign in to comment.
Something went wrong with that request. Please try again.