1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00
Files
django/tests/test_runner/test_parallel.py
Mariusz Felisiak 548209e620 Made RemoteTestResultTest.test_pickle_errors_detection() compatible with tblib 3.2+.
tblib 3.2+ makes exception subclasses with __init__() and the default
__reduce__() picklable. This broke the test for
RemoteTestResult._confirm_picklable(), which expects a specific
exception to fail unpickling.

https://github.com/ionelmc/python-tblib/blob/master/CHANGELOG.rst#320-2025-10-21

This fix defines ExceptionThatFailsUnpickling.__reduce__() in a way
that pickle.dumps(obj) succeeds, but pickle.loads(pickle.dumps(obj))
raises TypeError.

Refs #27301. This preserves the intent of the regression test from
52188a5ca6 without skipping it.
2025-10-21 23:10:31 -03:00

11 KiB