Пример #1
0
def test_emboss():
    emboss(test_input_file_path, test_output_file_path)
    test_output = skimage.io.imread(test_output_file_path)
    assert np.array_equal(
        test_output, exp_output), "The emboss function does not work properly."
Пример #2
0
def test_non_string_output():
    with pytest.raises(ValueError):
        emboss(test_input_file_path, 2384957372628)
Пример #3
0
def test_output_file_type_wrong():
    with pytest.raises(ValueError):
        emboss(test_input_file_path, "test_imgs/emboss/output.ppt")
Пример #4
0
def test_output_path_nonexistent():
    with pytest.raises(FileNotFoundError):
        emboss(test_input_file_path, "test_imgs/hello/world.png")
Пример #5
0
def test_non_string_input():
    with pytest.raises(AttributeError):
        emboss(9899999999, test_output_file_path)
Пример #6
0
def test_input_file_type_wrong():
    with pytest.raises(OSError):
        emboss("test_imgs/emboss/input.pdf", test_output_file_path)