Skip to content

Commit

Permalink
Revert "errors_in_topic_vows.py (minor): Inherit from Vows.Context"
Browse files Browse the repository at this point in the history
This reverts commit 0ea69de.
  • Loading branch information
Zearin committed Mar 18, 2014
1 parent cbe3b79 commit 28a5baa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/errors_in_topic_vows.py
Expand Up @@ -17,26 +17,26 @@
@Vows.batch
class ErrorsInTopicFunction(Vows.Context):

class WhenTopicRaisesAnException(Vows.Context):
class WhenTopicRaisesAnException:
def topic(self):
return 42 / 0

def tests_should_not_run(self, topic):
raise RuntimeError("Should not reach here")

class SubContext(Vows.Context):
class SubContext:
def subcontexts_should_also_not_run(self, topic):
raise RuntimeError("Should not reach here")

class WhenTopicRaisesAnExceptionWithCaptureErrorDecorator(Vows.Context):
class WhenTopicRaisesAnExceptionWithCaptureErrorDecorator:
@Vows.capture_error
def topic(self):
return 42 / 0

def it_is_passed_to_tests_as_normal(self, topic):
expect(topic).to_be_an_error_like(ZeroDivisionError)

class WhenTopicReturnsAnException(Vows.Context):
class WhenTopicReturnsAnException:
def topic(self):
try:
return 42 / 0
Expand Down

0 comments on commit 28a5baa

Please sign in to comment.