μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
env.py
Go to the documentation of this file.
1# -*- coding: utf-8 -*-
2import platform
3import sys
4
5import pytest
6
7LINUX = sys.platform.startswith("linux")
8MACOS = sys.platform.startswith("darwin")
9WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin")
10
11CPYTHON = platform.python_implementation() == "CPython"
12PYPY = platform.python_implementation() == "PyPy"
13
14PY2 = sys.version_info.major == 2
15
16PY = sys.version_info
17
18
20 """
21 pytest.deprecated_call() seems broken in pytest<3.9.x; concretely, it
22 doesn't work on CPython 3.8.0 with pytest==3.3.2 on Ubuntu 18.04 (#2922).
23
24 This is a narrowed reimplementation of the following PR :(
25 https://github.com/pytest-dev/pytest/pull/4104
26 """
27 # TODO: Remove this when testing requires pytest>=3.9.
28 pieces = pytest.__version__.split(".")
29 pytest_major_minor = (int(pieces[0]), int(pieces[1]))
30 if pytest_major_minor < (3, 9):
31 return pytest.warns((DeprecationWarning, PendingDeprecationWarning))
32 else:
33 return pytest.deprecated_call()
def deprecated_call()
Definition: env.py:19