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 3e9d7ac commit 7ff66a1Copy full SHA for 7ff66a1
tests/unit/create/via_global_ref/builtin/testing/path.py
@@ -47,11 +47,15 @@ class PathMockABC(FakeDataABC, Path):
47
"""Mocks the behavior of `Path`"""
48
49
_flavour = getattr(Path(), "_flavour", None)
50
-
51
if hasattr(_flavour, "altsep"):
52
# Allows to pass some tests for Windows via PosixPath.
53
_flavour.altsep = _flavour.altsep or "\\"
54
+ # Python 3.13 renamed _flavour to pathmod
55
+ pathmod = getattr(Path(), "pathmod", None)
56
+ if hasattr(pathmod, "altsep"):
57
+ pathmod.altsep = pathmod.altsep or "\\"
58
+
59
def exists(self):
60
return self.is_file() or self.is_dir()
61
0 commit comments