[Jython-checkins] jython: Allow AttributeError in Jython.

frank.wierzbicki jython-checkins at python.org
Thu Mar 21 23:37:04 CET 2013


http://hg.python.org/jython/rev/a07997d67bb2
changeset:   7094:a07997d67bb2
user:        Frank Wierzbicki <fwierzbicki at gmail.com>
date:        Thu Mar 21 15:36:58 2013 -0700
summary:
  Allow AttributeError in Jython.

files:
  Lib/test/test_functools.py |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -117,13 +117,15 @@
         self.assertRaises(ZeroDivisionError, self.thetype(f), 1, 0)
         self.assertRaises(ZeroDivisionError, self.thetype(f, y=0), 1)
 
-    @unittest.skip("FIXME: Not working in Jython.")
     def test_attributes(self):
         p = self.thetype(hex)
         try:
             del p.__dict__
         except TypeError:
             pass
+        except AttributeError:
+            #In some cases Jython raises AttributeError here.
+            pass
         else:
             self.fail('partial object allowed __dict__ to be deleted')
 

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list