Example #1
0
def test_string_is_not_ok():
    nt.assert_false(ok("123"))
Example #2
0
def test_anything_is_not_ok():
    class Foo(object):
        pass
    nt.assert_false(ok(Foo()))
    nt.assert_false(ok(123))
Example #3
0
def test_ndarray_is_not_ok():
    nt.assert_false(ok(np.array([1,2,3])))
Example #4
0
def test_set_is_not_ok():
    nt.assert_false(ok({1,2,3}))
Example #5
0
def test_dict_is_not_ok():
    nt.assert_false(ok({1:1, 2:2, 3:3}))
Example #6
0
def test_tuple_is_not_ok():
    nt.assert_false(ok((1,2,3)))
Example #7
0
def test_empty_ndarray_is_ok():
    nt.assert_true(ok(np.array([])))
Example #8
0
def test_false_is_not_ok():
    nt.assert_true(not ok(False))
Example #9
0
def test_empty_set_is_ok():
    nt.assert_true(ok(set()))
Example #10
0
def test_empty_string_is_ok():
    nt.assert_true(ok(""))
Example #11
0
def test_empty_tuple_is_ok():
    nt.assert_true(ok(tuple()))
Example #12
0
def test_empty_dict_is_ok():
    nt.assert_true(ok({}))
Example #13
0
def test_empty_list_is_ok():
    nt.assert_true(ok([]))
Example #14
0
def test_ok_true_is_ok():
    nt.assert_true(ok(MockResult(True)))
Example #15
0
def test_list_is_not_ok():
    nt.assert_false(ok([1,2,3]))
Example #16
0
def test_ok_false_is_not_ok():
    nt.assert_true(not ok(MockResult(False)))
Example #17
0
def test_true_is_ok():
    nt.assert_true(ok(True))