[Supervisor-checkins] r890 - supervisor/trunk/src/supervisor/tests
Mike Naberezny
mike at maintainable.com
Fri Sep 25 21:47:28 EDT 2009
Author: Mike Naberezny <mike at maintainable.com>
Date: Fri Sep 25 21:47:28 2009
New Revision: 890
Log:
Fix test to work across time zones.
Modified:
supervisor/trunk/src/supervisor/tests/test_childutils.py
Modified: supervisor/trunk/src/supervisor/tests/test_childutils.py
==============================================================================
--- supervisor/trunk/src/supervisor/tests/test_childutils.py (original)
+++ supervisor/trunk/src/supervisor/tests/test_childutils.py Fri Sep 25 21:47:28 2009
@@ -1,4 +1,5 @@
import sys
+import time
import unittest
from StringIO import StringIO
@@ -40,8 +41,9 @@
def test_get_asctime(self):
from supervisor.childutils import get_asctime
- result = get_asctime(2147483647)
- self.assertEqual(result, '2038-01-18 22:14:07,000')
+ timestamp = time.mktime((2009, 1, 18, 22, 14, 7, 0, 0, 0))
+ result = get_asctime(timestamp)
+ self.assertEqual(result, '2009-01-18 22:14:07,000')
class TestProcessCommunicationsProtocol(unittest.TestCase):
def test_send(self):
More information about the Supervisor-checkins
mailing list