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