예제 #1
0
def test_assert_not_none_bad():
    with asserts.expect_exception(AssertionError):
        asserts.is_not_none(None)
예제 #2
0
def test_assert_same_bad(x, y):
    with asserts.expect_exception(AssertionError):
        asserts.are_same(x, y)
예제 #3
0
def test_assert_not_in_bad(item, collection):
    with asserts.expect_exception(AssertionError):
        asserts.is_not_in(item, collection)
예제 #4
0
def test_assert_not_empty_bad(collection):
    with asserts.expect_exception(AssertionError):
        asserts.is_not_empty(collection)
예제 #5
0
def test_test_call_not_implemented():
  t = Test('foo', 'bar.foo', 'foo bar test')
  with asserts.expect_exception(NotImplementedError):
    t()
예제 #6
0
def test_assert_not_equal_bad(x, y):
    with asserts.expect_exception(AssertionError):
        asserts.are_not_equal(x, y)
예제 #7
0
def test_assert_length_bad(collection):
    with asserts.expect_exception(AssertionError):
        asserts.has_length(collection, 1)
예제 #8
0
def test_test_call_not_implemented():
    t = Test('foo', 'bar.foo', 'foo bar test')
    with asserts.expect_exception(NotImplementedError):
        t()
예제 #9
0
def test_assert_same_bad(x, y):
    with asserts.expect_exception(AssertionError):
        asserts.are_same(x, y)
예제 #10
0
def test_assert_not_same_bad(value):
    with asserts.expect_exception(AssertionError):
        asserts.are_not_same(value, value)
예제 #11
0
def test_assert_not_none_bad():
    with asserts.expect_exception(AssertionError):
        asserts.is_not_none(None)
예제 #12
0
def test_assert_not_empty_bad(collection):
    with asserts.expect_exception(AssertionError):
        asserts.is_not_empty(collection)
예제 #13
0
def test_assert_not_in_bad(item, collection):
    with asserts.expect_exception(AssertionError):
        asserts.is_not_in(item, collection)
예제 #14
0
def test_assert_not_same_bad(value):
    with asserts.expect_exception(AssertionError):
        asserts.are_not_same(value, value)
예제 #15
0
def test_is_false_fail(value):
    with asserts.expect_exception(AssertionError):
        asserts.is_false(value)
예제 #16
0
def test_assert_length_bad(collection):
    with asserts.expect_exception(AssertionError):
        asserts.has_length(collection, 1)
예제 #17
0
def test_is_false_fail(value):
    with asserts.expect_exception(AssertionError):
        asserts.is_false(value)
예제 #18
0
def test_test_required_variables_not_implemented():
    t = Test('foo', 'bar.foo', 'foo bar test')
    with asserts.expect_exception(NotImplementedError):
        t.required_variables()
예제 #19
0
def test_assert_not_equal_bad(x, y):
    with asserts.expect_exception(AssertionError):
        asserts.are_not_equal(x, y)
예제 #20
0
def test_test_required_variables_not_implemented():
  t = Test('foo', 'bar.foo', 'foo bar test')
  with asserts.expect_exception(NotImplementedError):
    t.required_variables()
예제 #21
0
def test_divide_2_0():
  with asserts.expect_exception(ZeroDivisionError):
    2 / 0