Commit 5c9083e 1 parent 0a4593d commit 5c9083e Copy full SHA for 5c9083e
File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,15 @@ def init_module(filesystem):
60
60
else :
61
61
# in Python 3.12, the flavour is no longer an own class,
62
62
# but points to the os-specific path module (posixpath/ntpath)
63
- fake_os = FakeOsModule (filesystem )
64
- fake_path = fake_os .path
65
- FakePathlibModule .PureWindowsPath ._flavour = fake_path
66
- FakePathlibModule .PurePosixPath ._flavour = fake_path
63
+ fake_posix_os = FakeOsModule (filesystem )
64
+ fake_posix_path = fake_posix_os .path
65
+ FakePathlibModule .PurePosixPath ._flavour = fake_posix_path
66
+ # The Windows path separators must be customized.
67
+ fake_nt_os = FakeOsModule (filesystem )
68
+ fake_nt_path = fake_nt_os .path
69
+ fake_nt_path .sep = "\\ "
70
+ fake_nt_path .altsep = "/"
71
+ FakePathlibModule .PureWindowsPath ._flavour = fake_nt_path
67
72
68
73
69
74
def _wrap_strfunc (strfunc ):
You can’t perform that action at this time.
0 commit comments