Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
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.