Skip to content

Commit af4d421

Browse files
added more tests for existing dir and existing file
1 parent 43252bf commit af4d421

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffpy/labpdfproc/tests/test_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def test_set_output_directory(inputs, expected):
2828

2929

3030
def test_set_output_directory_bad():
31-
existing_dir = Path().cwd().resolve() / "existing_dir.py"
32-
with open(existing_dir, "w"):
31+
existing_file = Path().cwd().resolve() / "existing_file.py"
32+
with open(existing_file, "w"):
3333
pass
3434

35-
actual_args = argparse.Namespace(output_directory="existing_dir.py")
35+
actual_args = argparse.Namespace(output_directory="existing_file.py")
3636
with pytest.raises(FileExistsError):
3737
actual_args.output_directory = set_output_directory(actual_args)
3838
assert Path(actual_args.output_directory).exists()

0 commit comments

Comments
 (0)