[Checkins] SVN: zope.app.authentication/trunk/ * Using python's ``doctest`` module instead of deprecated ``zope.testing.doctest[unit]``.

Michael Howitz mh at gocept.com
Fri Aug 20 06:36:52 EDT 2010


Log message for revision 115827:
  * Using python's ``doctest`` module instead of deprecated ``zope.testing.doctest[unit]``.
  
  

Changed:
  U   zope.app.authentication/trunk/CHANGES.txt
  U   zope.app.authentication/trunk/src/zope/app/authentication/browser/tests.py
  U   zope.app.authentication/trunk/src/zope/app/authentication/principalfolder.txt
  U   zope.app.authentication/trunk/src/zope/app/authentication/tests.py

-=-
Modified: zope.app.authentication/trunk/CHANGES.txt
===================================================================
--- zope.app.authentication/trunk/CHANGES.txt	2010-08-20 10:16:48 UTC (rev 115826)
+++ zope.app.authentication/trunk/CHANGES.txt	2010-08-20 10:36:51 UTC (rev 115827)
@@ -5,7 +5,8 @@
 3.7.2 (unreleased)
 ------------------
 
-* ...
+* Using python's ``doctest`` module instead of deprecated
+  ``zope.testing.doctest[unit]``.
 
 
 3.7.1 (2010-02-11)
@@ -50,7 +51,7 @@
 
 * Fix login form redirection failure in some cases with Python 2.6.
 
-* Use the new ``zope.authentication`` package instead of ``zope.app.security``. 
+* Use the new ``zope.authentication`` package instead of ``zope.app.security``.
 
 * The "Password Manager Names" vocabulary and simple password manager registry
   were moved to the ``zope.password`` package.
@@ -102,7 +103,7 @@
 -------------------
 
 * Make it compatible with zope.app.container 3.6.1 and 3.5.4 changes,
-  Changed ``super(BTreeContainer, self).__init__()`` to 
+  Changed ``super(BTreeContainer, self).__init__()`` to
   ``super(GroupFolder, self).__init__()`` in ``GroupFolder`` class.
 
 3.4.1 (2007-10-24)

Modified: zope.app.authentication/trunk/src/zope/app/authentication/browser/tests.py
===================================================================
--- zope.app.authentication/trunk/src/zope/app/authentication/browser/tests.py	2010-08-20 10:16:48 UTC (rev 115826)
+++ zope.app.authentication/trunk/src/zope/app/authentication/browser/tests.py	2010-08-20 10:36:51 UTC (rev 115827)
@@ -20,7 +20,8 @@
 
 import re
 import unittest
-from zope.testing import renormalizing, doctest
+import doctest
+from zope.testing import renormalizing
 from zope.app.testing.setup import placefulSetUp, placefulTearDown
 import transaction
 from zope.interface import directlyProvides

Modified: zope.app.authentication/trunk/src/zope/app/authentication/principalfolder.txt
===================================================================
--- zope.app.authentication/trunk/src/zope/app/authentication/principalfolder.txt	2010-08-20 10:16:48 UTC (rev 115826)
+++ zope.app.authentication/trunk/src/zope/app/authentication/principalfolder.txt	2010-08-20 10:36:51 UTC (rev 115827)
@@ -24,7 +24,7 @@
 Principal folders provide the `IAuthenticatorPlugin` interface. When we
 provide suitable credentials:
 
-  >>> from zope.testing.doctestunit import pprint
+  >>> from pprint import pprint
   >>> principals.authenticateCredentials({'login': 'login1', 'password': '123'})
   PrincipalInfo(u'principal.p1')
 
@@ -99,9 +99,7 @@
 We can use batching parameters to specify a subset of results:
 
   >>> pprint(list(principals.search({'search': 'D'}, start=17)))
-  [u'principal.7',
-   u'principal.8',
-   u'principal.9']
+  [u'principal.7', u'principal.8', u'principal.9']
 
   >>> pprint(list(principals.search({'search': 'D'}, batch_size=5)))
   [u'principal.0',

Modified: zope.app.authentication/trunk/src/zope/app/authentication/tests.py
===================================================================
--- zope.app.authentication/trunk/src/zope/app/authentication/tests.py	2010-08-20 10:16:48 UTC (rev 115826)
+++ zope.app.authentication/trunk/src/zope/app/authentication/tests.py	2010-08-20 10:36:51 UTC (rev 115827)
@@ -19,7 +19,7 @@
 
 import unittest
 
-from zope.testing import doctest
+import doctest
 from zope.interface import implements
 from zope.component import provideUtility, provideAdapter, provideHandler
 from zope.component.eventtesting import getEvents, clearEvents



More information about the checkins mailing list