[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.66,1.67
Guido van Rossum
gvanrossum@users.sourceforge.net
Thu, 20 Sep 2001 14:49:55 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.149,2.150 descrobject.c,2.12,2.13 fileobject.c,2.129,2.130 frameobject.c,2.57,2.58 funcobject.c,2.44,2.45 methodobject.c,2.39,2.40 typeobject.c,2.66,2.67
- Next message: [Python-checkins] CVS: python/nondist/peps pep-0253.txt,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv7022
Modified Files:
test_descr.py
Log Message:
Add a small test to verify that member and getset descriptors now have
docstrings (using file.closed and file.name as examples).
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** test_descr.py 2001/09/20 21:39:07 1.66
--- test_descr.py 2001/09/20 21:49:53 1.67
***************
*** 1952,1956 ****
--- 1952,1963 ----
coerce(0j, C(0))
+ def descrdoc():
+ if verbose: print "Testing descriptor doc strings..."
+ def check(descr, what):
+ verify(descr.__doc__ == what, repr(descr.__doc__))
+ check(file.closed, "flag set if the file is closed") # getset descriptor
+ check(file.name, "file name") # member descriptor
+
def test_main():
lists()
***************
*** 1993,1996 ****
--- 2000,2004 ----
rich_comparisons()
coercions()
+ descrdoc()
if verbose: print "All OK"
- Previous message: [Python-checkins] CVS: python/dist/src/Objects classobject.c,2.149,2.150 descrobject.c,2.12,2.13 fileobject.c,2.129,2.130 frameobject.c,2.57,2.58 funcobject.c,2.44,2.45 methodobject.c,2.39,2.40 typeobject.c,2.66,2.67
- Next message: [Python-checkins] CVS: python/nondist/peps pep-0253.txt,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]