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