Skip to content

Commit aa68c64

Browse files
committed
Adjust expected name for PyPy
1 parent 5279368 commit aa68c64

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_class.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import pytest
22

3-
import env # noqa: F401
3+
import env
44
from pybind11_tests import ConstructorStats, UserType
55
from pybind11_tests import class_ as m
66

77

88
def test_obj_class_name():
9-
assert m.obj_class_name(UserType(1)) == "pybind11_tests.UserType"
10-
assert m.obj_class_name(UserType) == "pybind11_tests.UserType"
9+
if env.PYPY:
10+
expected_name = "UserType"
11+
else:
12+
expected_name = "pybind11_tests.UserType"
13+
assert m.obj_class_name(UserType(1)) == expected_name
14+
assert m.obj_class_name(UserType) == expected_name
1115

1216

1317
def test_repr():

0 commit comments

Comments
 (0)