Skip to content

Commit

Permalink
add test when FileExistsError is raised in mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Oct 25, 2022
1 parent 049753b commit 967f184
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ def test_mkdir_cli():
cmd.run()
assert memfs.isdir("data1")

with pytest.raises(FileExistsError):
cmd.run()

cmd = CommandMkdir(Namespace(path="data1/dir1/dir2", parents=True), memfs)
cmd.run()
assert memfs.isdir("data1/dir1")
Expand Down

0 comments on commit 967f184

Please sign in to comment.