This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pprint tests do not test pprint.pprint()
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, hp310780
Priority: normal Keywords:

Created on 2021-10-21 20:23 by eric.smith, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg404647 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-10-21 20:23
For example, see issue 45557, where pprint.pformat(underscore_numbers=True) worked, but pprint.pprint(underscore_numbers=True) did not.

Testing of pprint.pprint() should be added.
msg413484 - (view) Author: Haz (hp310780) Date: 2022-02-18 14:57
Hi! Any chance I could take this on if it hasn't already been actioned please? I assume the scope is to test all the pprint options?

Thanks!
msg413486 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2022-02-18 15:18
Sure, have a go at it!

Any testing of pprint.pprint() would be an improvement, but ideally all options should be tested.

It would probably be worthwhile to restructure the tests to run both pformat and pprint tests from the same logic, so that we only need to change one thing if new options are added. I haven't looked at the tests, so I'm not sure how much work this would be.
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89722
2022-02-18 15:18:17eric.smithsetmessages: + msg413486
2022-02-18 14:57:19hp310780setnosy: + hp310780
messages: + msg413484
2021-10-21 21:55:20eric.smithsettitle: pprint module does not test pprint.pprint() -> pprint tests do not test pprint.pprint()
2021-10-21 20:23:04eric.smithcreate