Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa1799f

Browse files
committed
Remove file_not_found_tmpdir fixture for TestRmtree
Since its presence doesn't make things any simpler or more elegant.(It was left over from a previous approach where it was used insome@DDT parameters.)
1 parentc4da058 commitaa1799f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

‎test/test_util.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ def permission_error_tmpdir(tmp_path):
5959
yieldtd
6060

6161

62-
@pytest.fixture
63-
deffile_not_found_tmpdir(tmp_path):
64-
"""Fixture to test errors deleting a directory that are not due to permissions."""
65-
yieldtmp_path/"testdir"# It is deliberately never created.
66-
67-
6862
classTestRmtree:
6963
"""Tests for :func:`git.util.rmtree`."""
7064

@@ -142,7 +136,9 @@ def test_does_not_wrap_perm_error_unless_enabled(self, mocker, permission_error_
142136
pytest.fail(f"rmtree unexpectedly attempts skip:{ex!r}")
143137

144138
@pytest.mark.parametrize("hide_windows_known_errors", [False,True])
145-
deftest_does_not_wrap_other_errors(self,mocker,file_not_found_tmpdir,hide_windows_known_errors):
139+
deftest_does_not_wrap_other_errors(self,tmp_path,mocker,hide_windows_known_errors):
140+
file_not_found_tmpdir=tmp_path/"testdir"# It is deliberately never created.
141+
146142
# See comments in test_wraps_perm_error_if_enabled for details about patching.
147143
mocker.patch.object(sys.modules["git.util"],"HIDE_WINDOWS_KNOWN_ERRORS",hide_windows_known_errors)
148144
mocker.patch.object(os,"chmod")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp