From e95d0635f145e2b865ff2f24e43a0801a2873409 Mon Sep 17 00:00:00 2001
From: Jim Fulton <jim@zope.com>
Date: Tue, 20 Apr 2010 21:46:48 +0000
Subject: [PATCH] Updated a test to work with or without Python optimization.

---
 src/ZEO/tests/testZEO.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ZEO/tests/testZEO.py b/src/ZEO/tests/testZEO.py
index 9e292d17..9daf82d3 100644
--- a/src/ZEO/tests/testZEO.py
+++ b/src/ZEO/tests/testZEO.py
@@ -486,7 +486,10 @@ class ZRPCConnectionTests(ZEO.tests.ConnectionTests.CommonSetupTearDown):
         # 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'
-- 
2.30.9