Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-145492: fix regression test for defaultdict factory repr#145788

Open
KowalskiThomas wants to merge 1 commit intopython:mainfrom
KowalskiThomas:kowalski/test-fix-regression-test-for-defaultdict-factory-repr
Open

gh-145492: fix regression test for defaultdict factory repr#145788
KowalskiThomas wants to merge 1 commit intopython:mainfrom
KowalskiThomas:kowalski/test-fix-regression-test-for-defaultdict-factory-repr

Conversation

@KowalskiThomas
Copy link
Contributor

@KowalskiThomasKowalskiThomas commentedMar 10, 2026
edited
Loading

What is this PR?

This PR fixes the regression test introduced in#145761 and that did not properly reproduce the issue.

Running the test without therepr changes now properly crashes.

% ./python.exe -m unittest test.test_defaultdict..........E..======================================================================ERROR: test_repr_recursive_factory (test.test_defaultdict.TestDefaultDict.test_repr_recursive_factory)----------------------------------------------------------------------Traceback (most recent call last):  File "/Users/thomas.kowalski/Documents/cpython/Lib/test/test_defaultdict.py", line 219, in test_repr_recursive_factory    r = repr(dd)  File "/Users/thomas.kowalski/Documents/cpython/Lib/test/test_defaultdict.py", line 215, in __repr__    return f"ProblematicFactory for {dd}"                                    ^^^^  File "/Users/thomas.kowalski/Documents/cpython/Lib/test/test_defaultdict.py", line 215, in __repr__    return f"ProblematicFactory for {dd}"                                    ^^^^  File "/Users/thomas.kowalski/Documents/cpython/Lib/test/test_defaultdict.py", line 215, in __repr__    return f"ProblematicFactory for {dd}"                                    ^^^^  [Previous line repeated 981 more times]RecursionError: maximum recursion depth exceeded----------------------------------------------------------------------Ran 13 tests in 1.742s

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

awaiting reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@KowalskiThomas@StanFromIreland

[8]ページ先頭

©2009-2026 Movatter.jp