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

@cached_property is not checked for doctests #107995

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@tjsmart

Description

@tjsmart

Checklist

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

CPython versions tested on:

3.10, CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.13.0a0 (heads/main:607f18c894, Aug 15 2023, 08:58:26) [GCC 11.4.0]

A clear and concise description of the bug:

Doctests belonging to afunctools.cached_property are not ran by doctest.

Here is a minimal example (saved in a filet.py):

fromfunctoolsimportcached_propertyclassFoo:@cached_propertydefmy_cached_property(self):"""        >>> assert False        """return1

If I then invoke doctest with this file, I'd expect to see an assertion error. Instead, this doctest is skipped:

$python -m doctest t.py# no failing output due to assertion error$echo$?# zero exit code0

Note, this issue was originally reported here:pytest-dev/pytest#11237.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-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