10000 Update test_printt for Python 3.13 · domdfcoding/domdf_python_tools@dab1f3b · GitHub
[go: up one dir, main page]

Skip to content

Commit dab1f3b

Browse files
committed
Update test_printt for Python 3.13
1 parent d17cc36 commit dab1f3b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,17 @@ def test_printr(obj, expects, capsys):
124124
assert re.match(expects, stdout[0])
125125

126126

127+
if sys.version_info >= (3, 13):
128+
pure_posix_path_expected = "<class 'pathlib._local.PurePosixPath'>"
129+
else:
130+
pure_posix_path_expected = "<class 'pathlib.PurePosixPath'>"
131+
132+
127133
@pytest.mark.parametrize(
128134
"obj, expects",
129135
[
130136
("This is a test", "<class 'str'>"),
131-
(pathlib.PurePosixPath("foo.txt"), "<class 'pathlib.PurePosixPath'>"),
137+
(pathlib.PurePosixPath("foo.txt"), pure_posix_path_expected),
132138
(1234, "<class 'int'>"),
133139
(12.34, "<class 'float'>"),
134140
(CustomRepr(), "<class 'tests.test_utils.CustomRepr'>"),

0 commit comments

Comments
 (0)
0