[Checkins] SVN: zope.proxy/branches/regebro-python3/src/zope/proxy/tests/test_proxy.py Finished Python 3 support
Lennart Regebro
regebro at gmail.com
Sun Mar 13 21:49:50 EDT 2011
Log message for revision 120899:
Finished Python 3 support
Changed:
U zope.proxy/branches/regebro-python3/src/zope/proxy/tests/test_proxy.py
-=-
Modified: zope.proxy/branches/regebro-python3/src/zope/proxy/tests/test_proxy.py
===================================================================
--- zope.proxy/branches/regebro-python3/src/zope/proxy/tests/test_proxy.py 2011-03-13 23:39:22 UTC (rev 120898)
+++ zope.proxy/branches/regebro-python3/src/zope/proxy/tests/test_proxy.py 2011-03-14 01:49:49 UTC (rev 120899)
@@ -120,6 +120,10 @@
self.assert_(w.__class__ is o.__class__)
def test_pickle_prevention(self):
+ # Proxies of old-style classes can't be pickled.
+ if sys.version > '3':
+ # No old-style classes in Python 3.
+ return
w = self.new_proxy(Thing())
self.assertRaises(pickle.PicklingError,
pickle.dumps, w)
@@ -348,7 +352,11 @@
self.failUnless(b is y)
def test_getslice(self):
- # Lists have special slicing bahvior.
+ # These tests are moot under Python 3 as __slice__ isn't supported.
+ if sys.version > '3':
+ return
+
+ # Lists have special slicing behavior.
pList = self.new_proxy([1, 2])
self.assertEqual(pList[-1:], [2])
self.assertEqual(pList[-2:], [1, 2])
More information about the checkins
mailing list