From 24e9b000504042058d86d5890860b7d62858c1e8 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:15:09 +0000 Subject: [PATCH] py3.13 compat --- tests/tools/test_doctest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tools/test_doctest.py b/tests/tools/test_doctest.py index 40ea1834..547e75e6 100644 --- a/tests/tools/test_doctest.py +++ b/tests/tools/test_doctest.py @@ -1,6 +1,7 @@ """Check that running :code:`doctest` works.""" import os +import sys from typing import TYPE_CHECKING from nbqa.__main__ import main @@ -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