Skip to content

Commit

Permalink
Fix exception text
Browse files Browse the repository at this point in the history
  • Loading branch information
insspb committed Jun 9, 2022
1 parent 759a6ac commit 7322abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cookiecutter/utils.py
Expand Up @@ -41,7 +41,7 @@ def make_sure_path_exists(path: "os.PathLike[str]") -> None:
try:
Path(path).mkdir(parents=True, exist_ok=True)
except OSError as error:
raise OSError(f'Unable to create replay directory at {path}') from error
raise OSError(f'Unable to create directory at {path}') from error


@contextlib.contextmanager
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Expand Up @@ -68,7 +68,7 @@ def test_make_sure_path_exists_correctly_handle_os_error(mocker):
mocker.patch("pathlib.Path.mkdir", side_effect=OSError)
with pytest.raises(OSError) as err:
utils.make_sure_path_exists(Path('protected_path'))
assert str(err.value) == "Unable to create replay directory at protected_path"
assert str(err.value) == "Unable to create directory at protected_path"


def test_work_in(tmp_path):
Expand Down

0 comments on commit 7322abd

Please sign in to comment.