env.py
Go to the documentation of this file.
1 from __future__ import annotations
2 
3 import platform
4 import sys
5 import sysconfig
6 
7 import pytest
8 
9 LINUX = sys.platform.startswith("linux")
10 MACOS = sys.platform.startswith("darwin")
11 WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin")
12 
13 CPYTHON = platform.python_implementation() == "CPython"
14 PYPY = platform.python_implementation() == "PyPy"
15 PY_GIL_DISABLED = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
16 
17 
19  """
20  pytest.deprecated_call() seems broken in pytest<3.9.x; concretely, it
21  doesn't work on CPython 3.8.0 with pytest==3.3.2 on Ubuntu 18.04 (#2922).
22 
23  This is a narrowed reimplementation of the following PR :(
24  https://github.com/pytest-dev/pytest/pull/4104
25  """
26  # TODO: Remove this when testing requires pytest>=3.9.
27  pieces = pytest.__version__.split(".")
28  pytest_major_minor = (int(pieces[0]), int(pieces[1]))
29  if pytest_major_minor < (3, 9):
30  return pytest.warns((DeprecationWarning, PendingDeprecationWarning))
31  return pytest.deprecated_call()
gtsam.examples.DogLegOptimizerExample.int
int
Definition: DogLegOptimizerExample.py:111
env.deprecated_call
def deprecated_call()
Definition: env.py:18


gtsam
Author(s):
autogenerated on Thu Jul 4 2024 03:01:20