A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-October/030304.html below:

[Python-checkins] python/dist/src/Lib/test test_descr.py,1.157,1.158

[Python-checkins] python/dist/src/Lib/test test_descr.py,1.157,1.158nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Fri, 18 Oct 2002 09:33:15 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv18066/Lib/test

Modified Files:
	test_descr.py 
Log Message:
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.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** test_descr.py	15 Oct 2002 01:01:53 -0000	1.157
--- test_descr.py	18 Oct 2002 16:33:13 -0000	1.158
***************
*** 1815,1818 ****
--- 1815,1830 ----
                               "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