Support Doctests
cwh1te opened this issue · 0 comments
cwh1te commented
Running Python 3.7.3 on Ubuntu 18.04 x64
For some reason, when using this decorator outside of the module it is declared in, it causes doctests to disappear at runtime.
For some reason, modifying the cached_property
class to inherit from property
fixes this. I got this idea from werkzeug.
I'm not going to pretend to understand why either is happening (your class preserves __doc__
like it should, but some magic in property
makes it accessible where it isn't otherwise).