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

DocTestFinder.find fails if module contains class objects with special characters #107715

Labels
type-bugAn unexpected behavior, bug, or error
@gertjanvanzwieten

Description

@gertjanvanzwieten

Bug report

Checklist

  • I am confident this is a bug in CPython, not a bug in a third-party project
  • I have searched the CPython issue tracker, and am confident this bug has not been reported before

A clear and concise description of the bug

Doctests initialization may fail withre.error in case a module contains (dynamically generated) class objects with special characters in their name. This is caused by the regular expression compiled indoctest.DocTestFinder._find_lineno failing to escape the class name before embedding it. If compilation does succeed, then invalid matches may result from interpreting the class name as a search pattern.

Your environment

  • CPython versions tested on: 3.9.2
  • Operating system and architecture: Debian linux amd64

Linked PRs

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