Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv23022/Lib/test Modified Files: Tag: release22-maint test_descr.py Log Message: Backport: Fix SF # 624982, Potential AV in slot_sq_item, by Greg Chapman Don't crash when getting value of a property raises an exception Index: test_descr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v retrieving revision 1.113.4.25 retrieving revision 1.113.4.26 diff -C2 -d -r1.113.4.25 -r1.113.4.26 *** test_descr.py 7 Oct 2002 18:08:26 -0000 1.113.4.25 --- test_descr.py 18 Oct 2002 16:45:39 -0000 1.113.4.26 *************** *** 1684,1687 **** --- 1684,1699 ---- "readonly %r attr on a property" % attr) + class D(object): + __getitem__ = property(lambda s: 1/0) + + d = D() + try: + for i in d: + str(i) + except ZeroDivisionError: + pass + else: + raise TestFailed, "expected ZeroDivisionError from bad property" + def supers(): if verbose: print "Testing super..."
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4