Skip to content

Commit 0d5492b

Browse files
changed to existing_file.touch()
1 parent e06e05b commit 0d5492b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/diffpy/labpdfproc/tests/test_tools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def test_set_output_directory(inputs, expected):
2828

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

3433
actual_args = argparse.Namespace(output_directory="existing_file.py")
3534
with pytest.raises(FileExistsError):

0 commit comments

Comments
 (0)