File: conftest.py

package info (click to toggle)
pytest-doctestplus 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: python: 2,016; makefile: 13; sh: 7
file content (14 lines) | stat: -rw-r--r-- 506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys
from packaging.version import Version
from platform import python_version

import pytest

PYTEST_LT_8_5 = Version(pytest.__version__) < Version('8.5.0.dev')


# Windows + Python 3.14.0 + pytest-dev have ResourceWarning, see
# https://github.com/scientific-python/pytest-doctestplus/issues/305
def pytest_runtestloop(session):
    if sys.platform == 'win32' and python_version() == "3.14.0" and not PYTEST_LT_8_5:
        session.add_marker(pytest.mark.filterwarnings('ignore::ResourceWarning'))