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