SVN: ZODB/branches/3.9/src/ZEO/tests/testZEO.py Updated a test to work with or without Python optimization.

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <20100420214648.999F49418C__28199.1502539769$1271800019$gmane$org@cvs.zope.org>
Log message for revision 111192:
  Updated a test to work with or without Python optimization.
  

Changed:
  U   ZODB/branches/3.9/src/ZEO/tests/testZEO.py

-=-
Modified: ZODB/branches/3.9/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/branches/3.9/src/ZEO/tests/testZEO.py	2010-04-20 20:09:17 UTC (rev 111191)
+++ ZODB/branches/3.9/src/ZEO/tests/testZEO.py	2010-04-20 21:46:48 UTC (rev 111192)
@@ -486,7 +486,10 @@
         # logged
         self._storage._connection.handle_request('foo',0,'history',(1,2,3,4))
         # test logging
-        level,message,kw = log[1]
+        if __debug__:
+            level,message,kw = log[1]
+        else:
+            level,message,kw = log[0]
         self.assertEqual(level,logging.ERROR)
         self.failUnless(message.endswith(
                 ') history() raised exception: history() takes at'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.