aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/pybind11/tests/test_multiple_inheritance.py
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/pybind11/tests/test_multiple_inheritance.py')
-rw-r--r--3rdparty/pybind11/tests/test_multiple_inheritance.py28
1 files changed, 20 insertions, 8 deletions
diff --git a/3rdparty/pybind11/tests/test_multiple_inheritance.py b/3rdparty/pybind11/tests/test_multiple_inheritance.py
index 475dd3b3..e6a7f976 100644
--- a/3rdparty/pybind11/tests/test_multiple_inheritance.py
+++ b/3rdparty/pybind11/tests/test_multiple_inheritance.py
@@ -1,4 +1,8 @@
+# -*- coding: utf-8 -*-
import pytest
+
+import env # noqa: F401
+
from pybind11_tests import ConstructorStats
from pybind11_tests import multiple_inheritance as m
@@ -10,6 +14,8 @@ def test_multiple_inheritance_cpp():
assert mt.bar() == 4
+@pytest.mark.skipif("env.PYPY and env.PY2")
+@pytest.mark.xfail("env.PYPY and not env.PY2")
def test_multiple_inheritance_mix1():
class Base1:
def __init__(self, i):
@@ -30,7 +36,6 @@ def test_multiple_inheritance_mix1():
def test_multiple_inheritance_mix2():
-
class Base2:
def __init__(self, i):
self.i = i
@@ -49,8 +54,9 @@ def test_multiple_inheritance_mix2():
assert mt.bar() == 4
+@pytest.mark.skipif("env.PYPY and env.PY2")
+@pytest.mark.xfail("env.PYPY and not env.PY2")
def test_multiple_inheritance_python():
-
class MI1(m.Base1, m.Base2):
def __init__(self, i, j):
m.Base1.__init__(self, i)
@@ -156,7 +162,6 @@ def test_multiple_inheritance_python():
def test_multiple_inheritance_python_many_bases():
-
class MIMany14(m.BaseN1, m.BaseN2, m.BaseN3, m.BaseN4):
def __init__(self):
m.BaseN1.__init__(self, 1)
@@ -171,8 +176,16 @@ def test_multiple_inheritance_python_many_bases():
m.BaseN7.__init__(self, 7)
m.BaseN8.__init__(self, 8)
- class MIMany916(m.BaseN9, m.BaseN10, m.BaseN11, m.BaseN12, m.BaseN13, m.BaseN14, m.BaseN15,
- m.BaseN16):
+ class MIMany916(
+ m.BaseN9,
+ m.BaseN10,
+ m.BaseN11,
+ m.BaseN12,
+ m.BaseN13,
+ m.BaseN14,
+ m.BaseN15,
+ m.BaseN16,
+ ):
def __init__(self):
m.BaseN9.__init__(self, 9)
m.BaseN10.__init__(self, 10)
@@ -218,7 +231,6 @@ def test_multiple_inheritance_python_many_bases():
def test_multiple_inheritance_virtbase():
-
class MITypePy(m.Base12a):
def __init__(self, i, j):
m.Base12a.__init__(self, i, j)
@@ -231,7 +243,7 @@ def test_multiple_inheritance_virtbase():
def test_mi_static_properties():
"""Mixing bases with and without static properties should be possible
- and the result should be independent of base definition order"""
+ and the result should be independent of base definition order"""
for d in (m.VanillaStaticMix1(), m.VanillaStaticMix2()):
assert d.vanilla() == "Vanilla"
@@ -253,7 +265,7 @@ def test_mi_static_properties():
assert d.static_value == 0
-@pytest.unsupported_on_pypy
+# Requires PyPy 6+
def test_mi_dynamic_attributes():
"""Mixing bases with and without dynamic attribute support"""