File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+ from packaging .version import Version
3+ from platform import python_version
4+
5+ import pytest
6+
7+ PYTEST_LT_8_5 = Version (pytest .__version__ ) < Version ('8.5.0.dev' )
8+
9+
10+ # Windows + Python 3.14.0 + pytest-dev have ResourceWarning, see
11+ # https://github.com/scientific-python/pytest-doctestplus/issues/305
12+ def pytest_runtestloop (session ):
13+ if sys .platform == 'win32' and python_version () == "3.14.0" and not PYTEST_LT_8_5 :
14+ session .add_marker (pytest .mark .filterwarnings ('ignore::ResourceWarning' ))
Original file line number Diff line number Diff line change 1- import sys
21import textwrap
32from functools import partial
43from packaging .version import Version
5- from platform import python_version
64
75import pytest
86import numpy as np
97
10- PYTEST_LT_8_5 = Version (pytest .__version__ ) < Version ('8.5.0.dev' )
11-
128# Keep this until we require numpy to be >=2.0 or there is a directive in doctestplus
139# to support multiple ways of repr
1410if Version (np .__version__ ) >= Version ("2.0.dev" ):
@@ -56,10 +52,3 @@ def make(*args, **kwargs):
5652 return testdir .makefile ('.rst' , * args , ** kwargs )
5753
5854 return make
59-
60-
61- # Windows + Python 3.14.0 + pytest-dev have ResourceWarning, see
62- # https://github.com/scientific-python/pytest-doctestplus/issues/305
63- def pytest_runtestloop (session ):
64- if sys .platform == 'win32' and python_version () == "3.14.0" and not PYTEST_LT_8_5 :
65- session .add_marker (pytest .mark .filterwarnings ('ignore::ResourceWarning' ))
You can’t perform that action at this time.
0 commit comments