Ejemplo n.º 1
0
def test_empty_file(empty_file_path):
    with raises(ValueError):
        read_magic_number(empty_file_path)
Ejemplo n.º 2
0
def test_file_doesnt_exits(file_doesnt_exist_path):
    with raises(ValueError):
        read_magic_number(file_doesnt_exist_path)
Ejemplo n.º 3
0
def test_file_without_number(without_number_file_path):
    with raises(ValueError):
        read_magic_number(without_number_file_path)
Ejemplo n.º 4
0
def test_file_with_not_of_float(not_ok_float_file_path):
    assert not read_magic_number(not_ok_float_file_path)
Ejemplo n.º 5
0
def test_file_with_not_ok_integer(not_ok_integer_file_path):
    assert not read_magic_number(not_ok_integer_file_path)
Ejemplo n.º 6
0
def test_file_with_ok_float(ok_float_file_path):
    assert read_magic_number(ok_float_file_path)
Ejemplo n.º 7
0
def test_not_a_file(not_a_file_path):
    with raises(ValueError):
        read_magic_number(not_a_file_path)