File indexing completed on 2025-01-18 10:17:51
0001 import platform
0002 import sys
0003
0004 import pytest
0005
0006 LINUX = sys.platform.startswith("linux")
0007 MACOS = sys.platform.startswith("darwin")
0008 WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin")
0009
0010 CPYTHON = platform.python_implementation() == "CPython"
0011 PYPY = platform.python_implementation() == "PyPy"
0012
0013
0014 def deprecated_call():
0015 """
0016 pytest.deprecated_call() seems broken in pytest<3.9.x; concretely, it
0017 doesn't work on CPython 3.8.0 with pytest==3.3.2 on Ubuntu 18.04 (#2922).
0018
0019 This is a narrowed reimplementation of the following PR :(
0020 https://github.com/pytest-dev/pytest/pull/4104
0021 """
0022
0023 pieces = pytest.__version__.split(".")
0024 pytest_major_minor = (int(pieces[0]), int(pieces[1]))
0025 if pytest_major_minor < (3, 9):
0026 return pytest.warns((DeprecationWarning, PendingDeprecationWarning))
0027 else:
0028 return pytest.deprecated_call()