File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11import glob
22import os
3+ import sys
4+ import warnings
35from platform import python_version
46from textwrap import dedent
5- import sys
67
78from packaging .version import Version
89
2526
2627
2728PYTEST_LT_6 = Version (pytest .__version__ ) < Version ('6.0.0' )
29+ PYTEST_LT_8_5 = Version (pytest .__version__ ) < Version ('8.5.0.dev' )
2830
2931
3032def test_ignored_whitespace (testdir ):
@@ -730,7 +732,13 @@ def f():
730732 testdir .makefile ('.rst' , foo = '>>> 1+1\n 2' )
731733
732734 testdir .inline_run ('--doctest-plus' ).assertoutcome (passed = 2 )
733- testdir .inline_run ('--doctest-plus' , '--doctest-rst' ).assertoutcome (passed = 3 )
735+ if os .name == "nt" and python_version () == "3.14.0" and not PYTEST_LT_8_5 :
736+ with warnings .catch_warnings ():
737+ # ResourceWarning unclosed file pytest.EXE --> PytestUnraisableExceptionWarning
738+ warnings .filterwarnings ("ignore" )
739+ testdir .inline_run ('--doctest-plus' , '--doctest-rst' ).assertoutcome (passed = 3 )
740+ else :
741+ testdir .inline_run ('--doctest-plus' , '--doctest-rst' ).assertoutcome (passed = 3 )
734742 testdir .inline_run (
735743 '--doctest-plus' , '--doctest-rst' , '--ignore' , '.'
736744 ).assertoutcome (passed = 0 )
You can’t perform that action at this time.
0 commit comments