[Zodb-checkins] SVN: ZODB/trunk/ Fixed: An elaborate test for trvial logic corrupted module state in a

jim cvs-admin at zope.org
Sat Dec 1 16:16:01 UTC 2012


Log message for revision 128461:
  Fixed: An elaborate test for trvial logic corrupted module state in a
         way that made other tests fail spuriously.
  

Changed:
  U   ZODB/trunk/CHANGES.txt
  U   ZODB/trunk/src/ZODB/event.py
  U   ZODB/trunk/src/ZODB/tests/testZODB.py

-=-
Modified: ZODB/trunk/CHANGES.txt
===================================================================
--- ZODB/trunk/CHANGES.txt	2012-11-28 18:11:15 UTC (rev 128460)
+++ ZODB/trunk/CHANGES.txt	2012-12-01 16:16:00 UTC (rev 128461)
@@ -2,6 +2,12 @@
  Change History
 ================
 
+4.0.0a3 (2012-12-01)
+=====================
+
+Fixed: An elaborate test for trvial logic corrupted module state in a
+       way that made other tests fail spuriously.
+
 4.0.0a2 (2012-11-13)
 =====================
 

Modified: ZODB/trunk/src/ZODB/event.py
===================================================================
--- ZODB/trunk/src/ZODB/event.py	2012-11-28 18:11:15 UTC (rev 128460)
+++ ZODB/trunk/src/ZODB/event.py	2012-12-01 16:16:00 UTC (rev 128461)
@@ -11,55 +11,8 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-
-def _noop(event):
-    """
-    Tests:
-
-    >>> import sys, ZODB.event
-    >>> notify = ZODB.event
-    >>> zopemod = sys.modules.get('zope', False)
-    >>> event = sys.modules.get('zope.event', False)
-    >>> if event:
-    ...    del zopemod.event
-    ...    sys.modules['zope.event'] = None
-    ...    _ = reload(ZODB.event)
-
-    If zope.event isn't installed, then notify is _noop
-
-    >>> ZODB.event.notify is ZODB.event._noop
-    True
-
-    If zope.event is installed, then notify is zope.event.notify:
-
-    >>> zope = sys.modules['zope'] = type(sys)('zope')
-    >>> zope.event = sys.modules['zope.event'] = type(sys)('zope.event')
-    >>> zope.event.notify = lambda e: None
-    >>> _ = reload(ZODB.event)
-    >>> ZODB.event.notify is zope.event.notify
-    True
-
-    Cleanup:
-
-    >>> if event is False:
-    ...     del sys.modules['zope.event']
-    ... else:
-    ...     if event:
-    ...         zopemod.event = event
-    ...     sys.modules['zope.event'] = event
-
-    >>> if zopemod is False:
-    ...     del sys.modules['zope']
-    ... else:
-    ...     sys.modules['zope'] = zopemod
-
-    >>> ZODB.event.notify = notify
-
-    """
-    pass
-
 try:
     from zope.event import notify
 except ImportError:
-    notify = _noop
+    notify = lambda event: None
 

Modified: ZODB/trunk/src/ZODB/tests/testZODB.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testZODB.py	2012-11-28 18:11:15 UTC (rev 128460)
+++ ZODB/trunk/src/ZODB/tests/testZODB.py	2012-12-01 16:16:00 UTC (rev 128461)
@@ -614,7 +614,6 @@
 def test_suite():
     return unittest.TestSuite((
         unittest.makeSuite(ZODBTests, 'check'),
-        doctest.DocTestSuite('ZODB.event'),
         ))
 
 if __name__ == "__main__":



More information about the Zodb-checkins mailing list