Skip to content

pprint tests do not test pprint.pprint() #89722

Description

@ericvsmith
BPO 45559
Nosy @ericvsmith, @hp310780

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-10-21.20:23:04.931>
labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
title = 'pprint tests do not test pprint.pprint()'
updated_at = <Date 2022-02-18.15:18:17.383>
user = 'https://github.com/ericvsmith'

bugs.python.org fields:

activity = <Date 2022-02-18.15:18:17.383>
actor = 'eric.smith'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-10-21.20:23:04.931>
creator = 'eric.smith'
dependencies = []
files = []
hgrepos = []
issue_num = 45559
keywords = []
message_count = 3.0
messages = ['404647', '413484', '413486']
nosy_count = 2.0
nosy_names = ['eric.smith', 'hp310780']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue45559'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Linked PRs

Activity

  1. ericvsmith commented on Oct 21, 2021

    @ericvsmith
    MemberAuthor

    For example, see bpo-45557, where pprint.pformat(underscore_numbers=True) worked, but pprint.pprint(underscore_numbers=True) did not.

    Testing of pprint.pprint() should be added.

  2. added
    3.11only security fixes
    stdlibStandard Library Python modules in the Lib/ directory
    type-bugAn unexpected behavior, bug, or error
    on Oct 21, 2021
  3. changed the title [-]pprint module does not test pprint.pprint()[/-] [+]pprint tests do not test pprint.pprint()[/+] on Oct 21, 2021
  4. changed the title [-]pprint module does not test pprint.pprint()[/-] [+]pprint tests do not test pprint.pprint()[/+] on Oct 21, 2021
  5. hp310780 commented on Feb 18, 2022

    hp310780mannequin
  6. ericvsmith commented on Feb 18, 2022

    @ericvsmith
    MemberAuthor

    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.

  7. transferred this issue fromon Apr 10, 2022
  8. added 2 commits that reference this issue on Jul 26, 2022
  9. hp310780 commented on Jul 26, 2022

    @hp310780
  10. hp310780 commented on Aug 5, 2022

    @hp310780
  11. added
    testsTests in the Lib/test dir
    and removed
    stdlibStandard Library Python modules in the Lib/ directory
    3.11only security fixes
    on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions