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