[Zope3-checkins] CVS: zopeproducts/psycopgda/tests - test_adapter.py:1.2
Viktorija Zaksiene
ryzaja@codeworks.lt
Mon, 12 May 2003 04:18:22 -0400
Update of /cvs-repository/zopeproducts/psycopgda/tests
In directory cvs.zope.org:/tmp/cvs-serv17448/tests
Modified Files:
test_adapter.py
Log Message:
Cleanup: removed unused imports and whitespaces.
=== zopeproducts/psycopgda/tests/test_adapter.py 1.1 => 1.2 ===
--- zopeproducts/psycopgda/tests/test_adapter.py:1.1 Thu Jan 9 06:38:58 2003
+++ zopeproducts/psycopgda/tests/test_adapter.py Mon May 12 04:18:21 2003
@@ -18,7 +18,6 @@
from unittest import TestCase, TestSuite, main, makeSuite
import psycopg
-import sys
from datetime import tzinfo, timedelta
class Stub:
@@ -77,7 +76,7 @@
from datetime import date
self.assertEquals(_conv_date(''), None)
self.assertEquals(_conv_date('2001-03-02'), date(2001, 3, 2))
-
+
def test_conv_time(self):
from zopeproducts.psycopgda.adapter import _conv_time
from datetime import time
@@ -95,7 +94,7 @@
time(12, 44, 01, 0, TZStub(1,0)))
self.assertEquals(_conv_timetz('12:44:01.037-00:30'),
time(12, 44, 01, 37000, TZStub(0,-30)))
-
+
def test_conv_timestamp(self):
from zopeproducts.psycopgda.adapter import _conv_timestamp
from datetime import datetime
@@ -106,12 +105,12 @@
datetime(2001, 3, 2, 12, 44, 01, 37000))
self.assertEquals(_conv_timestamp('2001-03-02 12:44:01.000001'),
datetime(2001, 3, 2, 12, 44, 01, 1))
-
+
def test_conv_timestamptz(self):
from zopeproducts.psycopgda.adapter import _conv_timestamptz as c
from datetime import datetime
self.assertEquals(c(''), None)
-
+
self.assertEquals(c('2001-03-02 12:44:01+01:00'),
datetime(2001, 3, 2, 12, 44, 01, 0, TZStub(1,0)))
self.assertEquals(c('2001-03-02 12:44:01.037-00:30'),
@@ -222,7 +221,7 @@
('12:34:17', (12, 34, 17)),
('12:34:17.5', (12, 34, 17.5)),
('12:34:17,5', (12, 34, 17.5)))
-
+
basic_tzs = (('Z', 0),
('+02', 2*60),
('+1130', 11*60+30),