tests: cleanup and ci hardening (#2397)

* tests: refactor and cleanup

* refactor: more consistent

* tests: vendor six

* tests: more xfails, nicer system

* tests: simplify to info

* tests: suggestions from @YannickJadoul and @bstaletic

* tests: restore some pypy tests that now pass

* tests: rename info to env

* tests: strict False/True

* tests: drop explicit strict=True again

* tests: reduce minimum PyTest to 3.1
This commit is contained in:
Henry Schreiner
2020-08-16 16:02:12 -04:00
committed by GitHub
parent 3618bea2aa
commit 4d9024ec71
26 changed files with 158 additions and 171 deletions

View File

@@ -1,5 +1,8 @@
# -*- coding: utf-8 -*-
import pytest
import env # noqa: F401
from pybind11_tests import ConstructorStats
from pybind11_tests import multiple_inheritance as m
@@ -11,7 +14,8 @@ def test_multiple_inheritance_cpp():
assert mt.bar() == 4
@pytest.bug_in_pypy
@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):
@@ -32,7 +36,6 @@ def test_multiple_inheritance_mix1():
def test_multiple_inheritance_mix2():
class Base2:
def __init__(self, i):
self.i = i
@@ -51,7 +54,8 @@ def test_multiple_inheritance_mix2():
assert mt.bar() == 4
@pytest.bug_in_pypy
@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):
@@ -256,7 +260,7 @@ def test_mi_static_properties():
assert d.static_value == 0
@pytest.unsupported_on_pypy_lt_6
# Requires PyPy 6+
def test_mi_dynamic_attributes():
"""Mixing bases with and without dynamic attribute support"""