[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/ Changed the output of connectionDebugInfo to make it platform
Jim Fulton
jim at zope.com
Fri Dec 5 08:54:42 EST 2008
Log message for revision 93641:
Changed the output of connectionDebugInfo to make it platform
independent.
Changed:
U ZODB/trunk/src/ZODB/DB.py
U ZODB/trunk/src/ZODB/tests/testDB.py
-=-
Modified: ZODB/trunk/src/ZODB/DB.py
===================================================================
--- ZODB/trunk/src/ZODB/DB.py 2008-12-05 10:29:52 UTC (rev 93640)
+++ ZODB/trunk/src/ZODB/DB.py 2008-12-05 13:54:42 UTC (rev 93641)
@@ -758,7 +758,9 @@
d = "%s (%s)" % (d, len(c._cache))
result.append({
- 'opened': o and ("%s (%.2fs)" % (time.ctime(o), t-o)),
+ 'opened': o and ("%s (%.2fs)" % (
+ time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(o)),
+ t-o)),
'info': d,
'before': c.before,
})
Modified: ZODB/trunk/src/ZODB/tests/testDB.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testDB.py 2008-12-05 10:29:52 UTC (rev 93640)
+++ ZODB/trunk/src/ZODB/tests/testDB.py 2008-12-05 13:54:42 UTC (rev 93641)
@@ -104,7 +104,7 @@
>>> db.close()
"""
-def test_connectionDebugInfo():
+def connectionDebugInfo():
r"""DB.connectionDebugInfo provides information about connections.
>>> import time
@@ -133,14 +133,14 @@
>>> import pprint
>>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1)
[{'before': None,
- 'info': ' (0)',
- 'opened': None},
- {'before': None,
'info': 'test info (2)',
- 'opened': 'Thu Dec 04 15:40:44 2008 (1.40s)'},
+ 'opened': '2008-12-04T15:40:44 (1.40s)'},
{'before': '\x03zY\xd8\xc0m9\xdd',
'info': ' (0)',
- 'opened': 'Thu Dec 04 15:40:45 2008 (0.30s)'}]
+ 'opened': '2008-12-04T15:40:45 (0.30s)'},
+ {'before': None,
+ 'info': ' (0)',
+ 'opened': None}]
>>> time.time = real_time
More information about the Zodb-checkins
mailing list