[Python-checkins] python/dist/src/Lib/test test_descr.py, 1.203,
1.204
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Thu Mar 3 17:45:22 CET 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2761/Lib/test
Modified Files:
test_descr.py
Log Message:
SF bug #1155938: Missing None check for __init__().
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -d -r1.203 -r1.204
--- test_descr.py 16 Jan 2005 00:25:31 -0000 1.203
+++ test_descr.py 3 Mar 2005 16:45:19 -0000 1.204
@@ -3965,6 +3965,18 @@
import gc; gc.collect()
vereq(hasattr(c, 'attr'), False)
+def test_init():
+ # SF 1155938
+ class Foo(object):
+ def __init__(self):
+ return 10
+ try:
+ Foo()
+ except TypeError:
+ pass
+ else:
+ raise TestFailed, "did not test __init__() for None return"
+
def test_main():
weakref_segfault() # Must be first, somehow
@@ -4058,6 +4070,7 @@
carloverre()
filefault()
vicious_descriptor_nonsense()
+ test_init()
if verbose: print "All OK"
More information about the Python-checkins
mailing list