Skip to content

Commit

Permalink
py3.13 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Nov 10, 2024
1 parent 1844628 commit 24e9b00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/tools/test_doctest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Check that running :code:`doctest` works."""

import os
import sys
from typing import TYPE_CHECKING

from nbqa.__main__ import main
Expand Down Expand Up @@ -51,6 +52,9 @@ def test_doctest_works(capsys: "CaptureFixture") -> None:
" 1 of 2 in notebook_for_testing_copy.hello\n"
"***Test Failed*** 1 failures.\n"
)
if sys.version_info >= (3, 13):
expected_out = expected_out.replace("1 failures", "1 failure")
expected_out = expected_out.replace("1 items", "1 item")

try:
assert out.replace("\r\n", "\n") == expected_out
Expand Down

0 comments on commit 24e9b00

Please sign in to comment.