def test_expect_not_to_raise_error_can_take_callable_with_args(self): class SpecialException(Exception): pass argument = object() def callable_(x): if not x is argument: raise SpecialException('foo') expect(callable_, argument).not_to(raise_error(SpecialException))
def test_expect_not_to_raise_error_can_take_callable_with_args(self): class SpecialException(Exception): pass argument = object() def callable_(x): if not x is argument: raise SpecialException('foo') expect(callable_, argument).not_to(raise_error(SpecialException))
def test_expect_to_raise_error_can_take_callable_with_arg_and_kwargs(self): class SpecialException(Exception): pass argument = object() kwargs = dict(x=argument) def callable_(arg, x=None): if arg is argument and x is argument: raise SpecialException('foo') expect(callable_, argument, **kwargs).to(raise_error(SpecialException))
def test_expect_to_raise_error_can_take_callable_with_arg_and_kwargs(self): class SpecialException(Exception): pass argument = object() kwargs = dict(x=argument) def callable_(arg, x=None): if arg is argument and x is argument: raise SpecialException('foo') expect(callable_, argument, **kwargs).to(raise_error(SpecialException))
def test_expect_pop_from_list_not_to_raise_IndexError(self): expect([0].pop).not_to(raise_error(IndexError))
def test_expect_pop_from_empty_list_to_raise_IndexError(self): expect([].pop).to(raise_error(IndexError))
def test_expect_pop_from_list_not_to_raise_IndexError(self): expect([0].pop).not_to(raise_error(IndexError))
def test_expect_pop_from_empty_list_to_raise_IndexError(self): expect([].pop).to(raise_error(IndexError))