Skip to content

Commit 6b6addf

Browse files
Update Lib/test/libregrtest/runtests.py
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent bc4e043 commit 6b6addf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Lib/test/libregrtest/runtests.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,12 @@ def from_json(worker_json):
6565

6666
class _EncodeRunTests(json.JSONEncoder):
6767
def default(self, o: Any) -> dict[str, Any]:
68-
match o:
69-
case RunTests():
70-
result = dataclasses.asdict(o)
71-
result["__runtests__"] = True
72-
return result
73-
case _:
74-
return super().default(o)
68+
if isinstance(o, RunTests):
69+
result = dataclasses.asdict(o)
70+
result["__runtests__"] = True
71+
return result
72+
else:
73+
return super().default(o)
7574

7675

7776
def _decode_runtests(d: dict[str, Any]) -> RunTests | dict[str, Any]:

0 commit comments

Comments
 (0)