8000 gh-111155: Fix direct invocation of `test_pprint` by sobolevn · Pull Request #111156 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111155: Fix direct invocation of test_pprint #111156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review
  • Loading branch information
sobolevn committed Oct 21, 2023
commit 6d22cb3a4e8c53382cecbb83ee552f72622aa631
4 changes: 3 additions & 1 deletion Lib/test/test_pprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,11 @@ def test_dataclass_with_repr(self):
self.assertEqual(formatted, "custom repr that doesn't fit within pprint width")

def test_dataclass_no_repr(self):
import re

dc = dataclass3()
formatted = pprint.pformat(dc, width=10)
self.assertRegex(formatted, rf"<{__name__}.dataclass3 object at \w+>")
self.assertRegex(formatted, re.escape(rf"<{__name__}.dataclass3 object at \w+>"))

def test_recursive_dataclass(self):
dc = dataclass4(None)
Expand Down
0