File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,6 @@ filterwarnings =
6161 # For pytest-asyncio deprecations that is expected to be resolved upstream
6262 # https://github.com/pytest-dev/pytest-asyncio/issues/924
6363 ignore:The configuration option " asyncio_default_fixture_loop_scope" :pytest.PytestDeprecationWarning
64- # Windows + Python 3.14 + pytest-dev have ResourceWarning, see
65- # https://github.com/scientific-python/pytest-doctestplus/issues/305
66- ignore::ResourceWarning
6764
6865[flake8]
6966max-line-length = 100
Original file line number Diff line number Diff line change 1- from functools import partial
1+ import sys
22import textwrap
3+ from functools import partial
34from packaging .version import Version
5+ from platform import python_version
46
57import pytest
68import numpy as np
79
10+ PYTEST_LT_8_5 = Version (pytest .__version__ ) < Version ('8.5.0.dev' )
811
912# Keep this until we require numpy to be >=2.0 or there is a directive in doctestplus
1013# to support multiple ways of repr
@@ -53,3 +56,10 @@ def make(*args, **kwargs):
5356 return testdir .makefile ('.rst' , * args , ** kwargs )
5457
5558 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