예제 #1
0
def test_check_non_positive_int1():
    a = np.random.randint(-100, 0)
    assert Validator.check_non_positive_int(a) == a
예제 #2
0
def test_check_non_positive_int2():
    a = np.random.randint(1, 100)
    with pytest.raises(ValueError):
        Validator.check_non_positive_int(a)
예제 #3
0
def test_check_non_positive_int4():
    with pytest.raises(TypeError):
        Validator.check_non_positive_int("str")