Skip to content

Commit 0a60453

Browse files
authored
Merge pull request #307 from pllim/fix-ci-win
2 parents 5e12021 + 7f1568c commit 0a60453

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_doctestplus.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import glob
22
import os
3+
import sys
4+
import warnings
35
from platform import python_version
46
from textwrap import dedent
5-
import sys
67

78
from packaging.version import Version
89

@@ -25,6 +26,7 @@
2526

2627

2728
PYTEST_LT_6 = Version(pytest.__version__) < Version('6.0.0')
29+
PYTEST_LT_8_5 = Version(pytest.__version__) < Version('8.5.0.dev')
2830

2931

3032
def test_ignored_whitespace(testdir):
@@ -730,7 +732,13 @@ def f():
730732
testdir.makefile('.rst', foo='>>> 1+1\n2')
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)

0 commit comments

Comments
 (0)