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."
def test_non_string_output(): with pytest.raises(ValueError): emboss(test_input_file_path, 2384957372628)
def test_output_file_type_wrong(): with pytest.raises(ValueError): emboss(test_input_file_path, "test_imgs/emboss/output.ppt")
def test_output_path_nonexistent(): with pytest.raises(FileNotFoundError): emboss(test_input_file_path, "test_imgs/hello/world.png")
def test_non_string_input(): with pytest.raises(AttributeError): emboss(9899999999, test_output_file_path)
def test_input_file_type_wrong(): with pytest.raises(OSError): emboss("test_imgs/emboss/input.pdf", test_output_file_path)