def test_patch_returns_error_on_invalid_dir():
 from gooey.gui import image_repository
 with pytest.raises(IOError) as kaboom:
  image_repository.patch_images('foo/bar/not/a/path')
 assert (' user supplied' in str(kaboom.value))
 assert ('foo/bar/not/a/path' in str(kaboom.value))

def test_patch_returns_error_on_invalid_dir ( ) : from gooey . gui import image_repository with pytest . raises ( IOError ) as kaboom : image_repository . patch_images ( 'foo/bar/not/a/path' ) assert ( ' user supplied' in str ( kaboom . value ) ) assert ( 'foo/bar/not/a/path' in str ( kaboom . value ) )
patch should explode with a helpful message if it cannot find the supplied directory .