Commit ecca6dff authored by Jim Fulton's avatar Jim Fulton

Changed the output of connectionDebugInfo to make it platform

independent.
parent d15d3a93
...@@ -758,7 +758,9 @@ class DB(object): ...@@ -758,7 +758,9 @@ class DB(object):
d = "%s (%s)" % (d, len(c._cache)) d = "%s (%s)" % (d, len(c._cache))
result.append({ 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, 'info': d,
'before': c.before, 'before': c.before,
}) })
......
...@@ -104,7 +104,7 @@ def test_invalidateCache(): ...@@ -104,7 +104,7 @@ def test_invalidateCache():
>>> db.close() >>> db.close()
""" """
def test_connectionDebugInfo(): def connectionDebugInfo():
r"""DB.connectionDebugInfo provides information about connections. r"""DB.connectionDebugInfo provides information about connections.
>>> import time >>> import time
...@@ -133,14 +133,14 @@ def test_connectionDebugInfo(): ...@@ -133,14 +133,14 @@ def test_connectionDebugInfo():
>>> import pprint >>> import pprint
>>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1) >>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1)
[{'before': None, [{'before': None,
'info': ' (0)',
'opened': None},
{'before': None,
'info': 'test info (2)', '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', {'before': '\x03zY\xd8\xc0m9\xdd',
'info': ' (0)', '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 >>> 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