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

test_argparse.py trailing spaces within test strings removed bymake patchcheck if file is modified #91984

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@AbhigyanBose

Description

@AbhigyanBose

Bug report
There are two strings intest_argparse.py which have lines ending with blank spaces. When the file is modified andmake patchcheck run, it removes these trailing spaces from within the strings. This causes the test cases that these strings are a part of to fail. The strings in question are:

This issue is further discussed over on#91841

Test Environment

CPython versions tested on:
-3,11(pulled latest main branch from python/cpython)
Operating system and architecture:
-Ubuntu LTS (20.04), 64-Bit

Proposed Fix
In both of these cases the lines are followed by a newline. We could append '\n' to the lines and remove the next line. As follows:

                foo         \n

This would solve the issue since the last character will no longer be a blank space. The strings would be essentially the same as before, thus the test cases will not be affected. (Confirmed this locally.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp