Commit 61eb70b3 authored by Jim Fulton's avatar Jim Fulton

Changed the output of connectionDebugInfo to make it platform

independent.
parent d75f2095
......@@ -758,7 +758,9 @@ class DB(object):
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,
})
......
......@@ -104,7 +104,7 @@ def test_invalidateCache():
>>> db.close()
"""
def test_connectionDebugInfo():
def connectionDebugInfo():
r"""DB.connectionDebugInfo provides information about connections.
>>> import time
......@@ -133,14 +133,14 @@ def test_connectionDebugInfo():
>>> 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment