We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbee59b commit a7fdc06Copy full SHA for a7fdc06
distutils/tests/test_dir_util.py
@@ -3,6 +3,7 @@
3
import os
4
import pathlib
5
import stat
6
+import sys
7
import unittest.mock as mock
8
from distutils import dir_util, errors
9
from distutils.dir_util import (
@@ -124,9 +125,12 @@ class FailPath(pathlib.Path):
124
125
def mkdir(self, *args, **kwargs):
126
raise OSError("Failed to create directory")
127
- _flavour = (
128
- pathlib._windows_flavour if os.name == 'nt' else pathlib._posix_flavour
129
- )
+ if sys.version_info < (3, 12):
+ _flavour = (
130
+ pathlib._windows_flavour
131
+ if os.name == 'nt'
132
+ else pathlib._posix_flavour
133
+ )
134
135
target = tmp_path / 'foodir'
136
0 commit comments