Message205905
It seems like there is also an issue with property classes defined in a different module.
In the example below Foo.x uses standard property, and Foo.y uses prop imported from the prop module.
This results in docstring for Foo.y to be missed:
filip@klocek:~/test$ cat prop.py
class prop(property):
pass
filip@klocek:~/test$ cat foo.py
from prop import prop
class Foo(object):
@property
def x(self):
"""
>>> Foo().x
'x'
"""
return 'x'
@prop
def y(self):
"""
>>> Foo().y
'y'
"""
return 'y'
filip@klocek:~/test$ python --version
Python 2.7.3
filip@klocek:~/test$ python -m doctest foo.py -v
Trying:
Foo().x
Expecting:
'x'
ok
2 items had no tests:
foo
foo.Foo
1 items passed all tests:
1 tests in foo.Foo.x
1 tests in 3 items.
1 passed and 0 failed.
Test passed.
filip@klocek:~/test$ python3 --version
Python 3.2.3
filip@klocek:~/test$ python3 -m doctest foo.py -v
Trying:
Foo().x
Expecting:
'x'
ok
2 items had no tests:
foo
foo.Foo
1 items passed all tests:
1 tests in foo.Foo.x
1 tests in 3 items.
1 passed and 0 failed.
Test passed.
filip@klocek:~/test$ |
|
Date |
User |
Action |
Args |
2013-12-11 13:25:49 | filip.zyzniewski | set | recipients:
+ filip.zyzniewski, georg.brandl, terry.reedy, ncoghlan, daaku, steven.daprano, brian.curtin, BreamoreBoy |
2013-12-11 13:25:49 | filip.zyzniewski | set | messageid: <1386768349.32.0.164713986829.issue4037@psf.upfronthosting.co.za> |
2013-12-11 13:25:49 | filip.zyzniewski | link | issue4037 messages |
2013-12-11 13:25:49 | filip.zyzniewski | create | |
|