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

Incorrect test intest_pyrepl #134214

Closed
Closed
Labels
easytestsTests in the Lib/test dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@tomasr8

Description

@tomasr8

Bug report

Bug description:

In this test:

forcode,parsedincases:
parser=ImportParser(code)
actual=parser.parse()
withself.subTest(code=code):
self.assertEqual(actual,parsed)
# The parser should not get tripped up by any
# other preceding statements
code=f'import xyz\n{code}'
withself.subTest(code=code):
self.assertEqual(actual,parsed)
code=f'import xyz;{code}'
withself.subTest(code=code):
self.assertEqual(actual,parsed)

The second and third assert is not rerunning theImportParser so it's not actually testing anything right now.
We need to add this before each call to assert:

parser=ImportParser(code)actual=parser.parse()

Please don't pick up this issue, I'd like to reserve it for someone at the PyConUS sprints :)

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    easytestsTests in the Lib/test dirtopic-replRelated to the interactive shelltype-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