We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dcef2a commit ad700feCopy full SHA for ad700fe
tests/test_pickling_trampoline.py
@@ -1,6 +1,8 @@
1
# -*- coding: utf-8 -*-
2
import pytest
3
4
+import env # noqa: F401
5
+
6
from pybind11_tests import pickling_trampoline as m
7
8
try:
@@ -26,9 +28,10 @@ def test_roundtrip_simple_py_derived():
26
28
def test_roundtrip_simple_cpp_derived():
27
29
p = m.make_SimpleCppDerivedAsBase()
30
p.num = 404
- with pytest.raises(AttributeError):
- # To ensure that future changes do not accidentally invalidate this unit test.
31
- p.__dict__
+ if not env.PYPY:
32
+ with pytest.raises(AttributeError):
33
+ # To ensure that future changes do not accidentally invalidate this unit test.
34
+ p.__dict__
35
data = pickle.dumps(p, pickle.HIGHEST_PROTOCOL)
36
p2 = pickle.loads(data)
37
assert p2.num == 404
0 commit comments