CI: adding Python 3.14 for testing by bsipocz · Pull Request #300 · scientific-python/pytest-doctestplus

@bsipocz

@bsipocz

@bsipocz

Ahh, windows is giving me tears again 😭

@pllim

Could this be upstream bug? I tried to look at pytest code but then I got confused because it has both assertoutcome and assert_outcomes, and the latter seems to be better documented in change log.

@pllim

pytest does have a passing Windows job for Python 3.14 but not sure about its coverage.

@bsipocz

I think it's something going wrong with the skip logic, at least some of those are tests that should have been skipped, see that the math is correct, but we expected the wrong value.

003 >>> 1 + 1
Expected:
    3
Got:
    2

@pllim

I think these are the offending checks? I don't see any skip directive.

makepyfile(p2='>>> 1 + 1\n3')
makerstfile(r3='>>> 1 + 1\n3')

I also see this at the end. Maybe this is the real reason?

pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing file <_io.FileIO name='D:\\a\\pytest-doctestplus\\pytest-doctestplus\\.tox\\py314-test-pytestdev\\Scripts\\pytest.EXE' mode='rb' closefd=True>: None

@bsipocz

Ahh, then these are the culprits, it should have been picked up for asserting the outcome. I indeed wonder if the file creation was messed up?

testdir.inline_run("--doctest-plus").assertoutcome(passed=3, failed=1)

@pllim

Let's ping our old friend @nicoddemus in case he is aware of such problem upstream with Python 3.14 + Windows, or can point us somewhere? 🙏

@nicoddemus

Hi folks,

Nothing specific comes to mind.

One option I guess is to ignore that PytestUnraisableExceptionWarning on Windows in Python 3.14, using @pytest.mark.filterwarnings.

Sorry I can't be more helpful.

@bsipocz

pllim

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!