We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c8f2ca commit 530f874Copy full SHA for 530f874
1 file changed
tests/test_pickle_exception.py
@@ -386,6 +386,23 @@ def test_real_oserror():
386
assert str_output == str(exc)
387
388
389
+def test_timeouterror():
390
+ try:
391
+ raise TimeoutError('stuff')
392
+ except Exception as e:
393
+ exc = e
394
+ else:
395
+ pytest.fail('os.open should have raised an TimeoutError')
396
+
397
+ str_output = str(exc)
398
+ tblib.pickling_support.install(exc)
399
+ exc = pickle.loads(pickle.dumps(exc))
400
401
+ assert isinstance(exc, TimeoutError)
402
+ assert exc.errno is None
403
+ assert str_output == str(exc)
404
405
406
@pytest.mark.skipif(not has_python311, reason='ExceptionGroup needs Python 3.11')
407
def test_exception_group():
408
errors = []
0 commit comments