Created
September 3, 2014 15:26
-
-
Save coreypobrien/ca9627e42985006efdab to your computer and use it in GitHub Desktop.
Better handling of unexpected topic exceptions for pyvows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============ | |
Vows Results | |
============ | |
A | |
B | |
Error in topic: | |
integer division or modulo by zero | |
Traceback (most recent call last): | |
File "/python/site-packages/pyvows/runner/gevent.py", line 104, in _run_setup_and_topic | |
topic = topic_func(*topic_list) | |
File "/testerror.py", line 13, in topic | |
return 42 / 0 | |
ZeroDivisionError: integer division or modulo by zero | |
Nested tests following this error have not been run. | |
✓ OK » 0 honored • 0 broken (0.000301s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teardown | |
============ | |
Vows Results | |
============ | |
A | |
B | |
Error in topic: | |
integer division or modulo by zero | |
Traceback (most recent call last): | |
File "/python/site-packages/pyvows/runner/gevent.py", line 104, in _run_setup_and_topic | |
topic = topic_func(*topic_list) | |
File "/testerror.py", line 13, in topic | |
return 42 / 0 | |
ZeroDivisionError: integer division or modulo by zero | |
Nested tests following this error have not been run. | |
✗ OK » 1 honored • 1 broken (0.000342s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyvows import Vows | |
@Vows.batch | |
class a(Vows.Context): | |
def topic(self): | |
return 'a' | |
def teardown(self): | |
print 'teardown' | |
class b(Vows.Context): | |
def topic(self): | |
return 42 / 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment