Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def must_fail(fn, *args, **kwargs):
    def test_decorated(self, *args, **kwargs):
        try:
            fn(self, *args, **kwargs)
        except BadExpectation:
            pass
        else:
            raise BadExpectation, 'it must fail'

    return test_decorated
        


src/r/o/robber.py-HEAD/tests/test_integration.py   robber.py(Download)
import unittest
from robber import expect, BadExpectation, failure_message
from util import must_fail
 
class TestIntegration(unittest.TestCase):