tests: Consolidate version (2 vs. 3) and platform (CPython vs. PyPy) checks (#2376)

Fix logic in test_bytes_to_string

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Eric Cousineau
2020-08-14 14:03:43 -04:00
committed by GitHub
parent cba4a98546
commit ebdd0d368c
6 changed files with 35 additions and 35 deletions

View File

@@ -2,11 +2,6 @@
import pytest
from pybind11_tests import kwargs_and_defaults as m
import platform
import sys
pypy = platform.python_implementation() == "PyPy"
def test_function_signatures(doc):
assert doc(m.kw_func0) == "kw_func0(arg0: int, arg1: int) -> str"
@@ -151,7 +146,7 @@ def test_keyword_only_args(msg):
"""
@pytest.mark.xfail(pypy and sys.version_info < (3, 0),
@pytest.mark.xfail(pytest.PYPY and pytest.PY2,
reason="PyPy2 doesn't seem to double count")
def test_args_refcount():
"""Issue/PR #1216 - py::args elements get double-inc_ref()ed when combined with regular