Debian Codegraph @

tests/test_issue30.py

raw
1 import pickle
2 import sys
3
4 import pytest
5
6 from tblib import pickling_support
7
8 pytest.importorskip('twisted')
9
10
11 def test_30():
12 from twisted.python.failure import Failure # noqa: PLC0415
13
14 pickling_support.install()
15
16 try:
17 raise ValueError
18 except ValueError:
19 s = pickle.dumps(sys.exc_info())
20
21 f = None
22 try:
23 _etype, evalue, etb = pickle.loads(s)
24 raise evalue.with_traceback(etb)
25 except ValueError:
26 f = Failure()
27
28 assert f is not None