Browse Source

Make BetterLoader() have a better api :)

pull/309/head
Armin Ronacher 14 years ago
parent
commit
5235c3e37e
  1. 3
      flask/testsuite/__init__.py
  2. 5
      run-tests.py

3
flask/testsuite/__init__.py

@ -157,8 +157,7 @@ class BetterLoader(unittest.TestLoader):
all_tests.append(testcase)
if not all_tests:
print >> sys.stderr, 'Error: could not find test case for "%s"' % name
sys.exit(1)
raise LookupError('could not find test case for "%s"' % name)
if len(all_tests) == 1:
return all_tests[0]

5
run-tests.py

@ -1,3 +1,6 @@
import unittest
from flask.testsuite import BetterLoader
unittest.main(testLoader=BetterLoader(), defaultTest='suite')
try:
unittest.main(testLoader=BetterLoader(), defaultTest='suite')
except Exception, e:
print 'Error: %s' % e

Loading…
Cancel
Save