Beispiel #1
0
def test_get_random_data_ValidateOutput():
    field_sizes_input = (1, 4, 5)
    result = noise.get_random_row(field_sizes_input)
    assert len(result) == len(field_sizes_input)

    for index in range(len(field_sizes_input)):
        assert result[index] < field_sizes_input[index]
Beispiel #2
0
def test_get_random_data_AssertIfNotTuple():
    field_sizes_input = (3,4,5)
    result = noise.get_random_row(field_sizes_input)
    assert isinstance(result, tuple)
Beispiel #3
0
def test_get_random_data_AssertEmptyRetValue():
    field_sizes_input = [1,2,3]
    result = noise.get_random_row(field_sizes_input)
    assert 0 != len(result)
Beispiel #4
0
def test_get_random_data_AssertSystemExitEmptyInput():
    field_sizes_input = ()
    with raises(SystemExit):
        noise.get_random_row(field_sizes_input)
Beispiel #5
0
def test_get_random_data_ValidateInput():
    field_sizes_input = 10
    with raises(TypeError):
        noise.get_random_row(field_sizes_input)