[Checkins] SVN: zope.interface/branches/regebro-python3/src/zope/interface/ fix tests for py3 compat: old-style classes don't exist anymore, so we get object anyway. Make the test use object voluntarily, so it can deal with that situation properly.

Wolfgang Schnerring wosc at wosc.de
Sat Sep 12 11:23:10 EDT 2009


Log message for revision 103871:
  fix tests for py3 compat: old-style classes don't exist anymore, so we get object anyway. Make the test use object voluntarily, so it can deal with that situation properly.
  

Changed:
  U   zope.interface/branches/regebro-python3/src/zope/interface/README.ru.txt
  U   zope.interface/branches/regebro-python3/src/zope/interface/README.txt
  U   zope.interface/branches/regebro-python3/src/zope/interface/tests/test_interface.py

-=-
Modified: zope.interface/branches/regebro-python3/src/zope/interface/README.ru.txt
===================================================================
--- zope.interface/branches/regebro-python3/src/zope/interface/README.ru.txt	2009-09-12 15:22:04 UTC (rev 103870)
+++ zope.interface/branches/regebro-python3/src/zope/interface/README.ru.txt	2009-09-12 15:23:10 UTC (rev 103871)
@@ -553,7 +553,7 @@
 
   >>> baz_implements = zope.interface.implementedBy(Baz)
   >>> baz_implements.__bases__
-  (<InterfaceClass __main__.IBaz>,)
+  (<InterfaceClass __main__.IBaz>, <implementedBy ...object>)
 
   >>> baz_implements.extends(IFoo)
   True
@@ -571,7 +571,8 @@
    <InterfaceClass __main__.IBaz>,
    <InterfaceClass __main__.IFoo>,
    <InterfaceClass __main__.IBlat>,
-   <InterfaceClass zope.interface.Interface>)
+   <InterfaceClass zope.interface.Interface>,
+   <implementedBy ...object>)
 
 Помеченные значения
 ===================

Modified: zope.interface/branches/regebro-python3/src/zope/interface/README.txt
===================================================================
--- zope.interface/branches/regebro-python3/src/zope/interface/README.txt	2009-09-12 15:22:04 UTC (rev 103870)
+++ zope.interface/branches/regebro-python3/src/zope/interface/README.txt	2009-09-12 15:23:10 UTC (rev 103871)
@@ -550,12 +550,12 @@
 declarations and specifications.  Declarations actually extend the
 interfaces that they declare::
 
-  >>> class Baz:
+  >>> class Baz(object):
   ...     zope.interface.implements(IBaz)
 
   >>> baz_implements = zope.interface.implementedBy(Baz)
   >>> baz_implements.__bases__
-  (<InterfaceClass __main__.IBaz>,)
+  (<InterfaceClass __main__.IBaz>, <implementedBy ...object>)
 
   >>> baz_implements.extends(IFoo)
   True
@@ -573,7 +573,8 @@
    <InterfaceClass __main__.IBaz>,
    <InterfaceClass __main__.IFoo>,
    <InterfaceClass __main__.IBlat>,
-   <InterfaceClass zope.interface.Interface>)
+   <InterfaceClass zope.interface.Interface>,
+   <implementedBy ...object>)
 
 
 Tagged Values

Modified: zope.interface/branches/regebro-python3/src/zope/interface/tests/test_interface.py
===================================================================
--- zope.interface/branches/regebro-python3/src/zope/interface/tests/test_interface.py	2009-09-12 15:22:04 UTC (rev 103870)
+++ zope.interface/branches/regebro-python3/src/zope/interface/tests/test_interface.py	2009-09-12 15:23:10 UTC (rev 103871)
@@ -341,12 +341,12 @@
     suite.addTest(doctest.DocFileSuite(
         '../README.txt',
         globs={'__name__': '__main__'},
-        optionflags=doctest.NORMALIZE_WHITESPACE,
+        optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
         ))
     suite.addTest(doctest.DocFileSuite(
         '../README.ru.txt',
         globs={'__name__': '__main__'},
-        optionflags=doctest.NORMALIZE_WHITESPACE,
+        optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
         ))
     return suite
 



More information about the checkins mailing list