-
-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
bugSomething isn't working as expectedSomething isn't working as expectedhelp wantedContribution especially encouragedContribution especially encouraged
Description
When running the test suite on PyPy3.10 7.3.13, I'm getting the following test failure:
$ poetry run pytest
............................................................................................................................... [ 49%]
................................................................F.....................................s........................ [ 98%]
..... [100%]
============================================================== FAILURES ===============================================================
_______________________________________ test_render_debug_better_error_message_recursion_error ________________________________________
def test_render_debug_better_error_message_recursion_error() -> None:
io = BufferedIO()
io.set_verbosity(Verbosity.DEBUG)
try:
recursion.recursion_error()
except RecursionError as e:
trace = ExceptionTrace(e)
lineno = 83
trace.render(io)
expected = rf"""^
Stack trace:
\d+ {re.escape(trace._get_relative_file_path(__file__))}:{lineno} in test_render_debug_better_error_message_recursion_error
{lineno - 2}\│
{lineno - 1}\│ try:
→ {lineno + 0}\│ recursion.recursion_error\(\)
{lineno + 1}\│ except RecursionError as e:
{lineno + 2}\│ trace = ExceptionTrace\(e\)
... Previous frame repeated \d+ times
\s*\d+ {re.escape(trace._get_relative_file_path(recursion.__file__))}:2 in recursion_error
1\│ def recursion_error\(\) -> None:
→ 2\│ recursion_error\(\)
3\│
RecursionError
maximum recursion depth exceeded
at {re.escape(trace._get_relative_file_path(recursion.__file__))}:2 in recursion_error
1\│ def recursion_error\(\) -> None:
→ 2\│ recursion_error\(\)
3\│
"""
> assert re.match(expected, io.fetch_output()) is not None
E AssertionError: assert None is not None
E + where None = <function match at 0x00007fb6301bfd80>('^\n Stack trace:\n\n \\d+ tests/ui/test_exception_trace\\.py:83 in test_render_debug_better_error_message_recursio...ursion_error\n 1\\│ def recursion_error\\(\\) -> None:\n → 2\\│ recursion_error\\(\\)\n 3\\│ \n', '\n Stack trace:\n\n 1660 tests/ui/test_exception_trace.py:83 in test_render_debug_better_error_message_recursion_e...on.py:2 in recursion_error\n 1│ def recursion_error() -> None:\n → 2│ recursion_error()\n 3│ \n')
E + where <function match at 0x00007fb6301bfd80> = re.match
E + and '\n Stack trace:\n\n 1660 tests/ui/test_exception_trace.py:83 in test_render_debug_better_error_message_recursion_e...on.py:2 in recursion_error\n 1│ def recursion_error() -> None:\n → 2│ recursion_error()\n 3│ \n' = <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x00007fb62a384608>>()
E + where <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x00007fb62a384608>> = <cleo.io.buffered_io.BufferedIO object at 0x00007fb62a384608>.fetch_output
tests/ui/test_exception_trace.py:117: AssertionError
======================================================= short test summary info =======================================================
FAILED tests/ui/test_exception_trace.py::test_render_debug_better_error_message_recursion_error - AssertionError: assert None is not None
1 failed, 257 passed, 1 skipped in 1.78sApparently the actual output is:
Stack trace:
1660 tests/ui/test_exception_trace.py:83 in test_render_debug_better_error_message_recursion_error
81│
82│ try:
→ 83│ recursion.recursion_error()
84│ except RecursionError as e:
85│ trace = ExceptionTrace(e)
... Previous frame repeated 1658 times
1 tests/fixtures/exceptions/recursion.py:2 in recursion_error
1│ def recursion_error() -> None:
→ 2│ recursion_error()
3│
RecursionError
maximum recursion depth exceeded
at tests/fixtures/exceptions/recursion.py:2 in recursion_error
1│ def recursion_error() -> None:
→ 2│ recursion_error()
3│
Metadata
Metadata
Assignees
Labels
bugSomething isn't working as expectedSomething isn't working as expectedhelp wantedContribution especially encouragedContribution especially encouraged