Skip to content

Commit 9c1bec6

Browse files
committed
Fix test_mkpath_exception_uncached
1 parent 2517976 commit 9c1bec6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

distutils/tests/test_dir_util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ class FailPath(pathlib.Path):
123123
def mkdir(self, *args, **kwargs):
124124
raise OSError("Failed to create directory")
125125

126+
_flavor = (
127+
pathlib._windows_flavour if os.name == 'nt' else pathlib._posix_flavour
128+
)
129+
126130
target = tmp_path / 'foodir'
127131

128132
with pytest.raises(errors.DistutilsFileError):

0 commit comments

Comments
 (0)