Content-Length: 273345 | pFad | http://github.com/python/cpython/commit/aa4240ebea1aacc907b1efa58e7f547d90cff3b1

6F gh-145492: fix regression test for defaultdict factory repr (GH-145788) · python/cpython@aa4240e · GitHub
Skip to content

Commit aa4240e

Browse files
gh-145492: fix regression test for defaultdict factory repr (GH-145788)
1 parent eb9ae65 commit aa4240e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_defaultdict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ def __call__(self):
212212
return {}
213213
def __repr__(self):
214214
repr(dd)
215-
return "ProblematicFactory()"
215+
return f"ProblematicFactory for {dd}"
216216

217217
dd = defaultdict(ProblematicFactory())
218218
# Should not raise RecursionError
219219
r = repr(dd)
220-
self.assertIn('ProblematicFactory()', r)
220+
self.assertIn("ProblematicFactory for", r)
221221

222222
if __name__ == "__main__":
223223
unittest.main()

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/aa4240ebea1aacc907b1efa58e7f547d90cff3b1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy