diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-12-21 04:58:38 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-12-21 05:02:19 +0000 |
commit | ade1b2cc7b9fc7b0fc05f70e2c15c1d1d1e56ca8 (patch) | |
tree | a831e5f16a239ca33c7920bbada5f58928a954e5 /tests/test_dates.py | |
parent | f697410ab4aac2f7ac789e78efc4e5ac5dfb6f71 (diff) | |
download | psycopg2-ade1b2cc7b9fc7b0fc05f70e2c15c1d1d1e56ca8.tar.gz |
Test suite converted into a proper package.
Dropped cyclic import from modules to tests: they were only working
because a second copy of the package was found in the project dir.
Use relative import so that 2to3 can do a good conversion.
Diffstat (limited to 'tests/test_dates.py')
-rw-r--r-- | tests/test_dates.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_dates.py b/tests/test_dates.py index 9958913..44b1bc5 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -2,9 +2,9 @@ import math import unittest -import tests import psycopg2 from psycopg2.tz import FixedOffsetTimezone +from testconfig import dsn class CommonDatetimeTestsMixin: @@ -75,7 +75,7 @@ class DatetimeTests(unittest.TestCase, CommonDatetimeTestsMixin): """Tests for the datetime based date handling in psycopg2.""" def setUp(self): - self.conn = psycopg2.connect(tests.dsn) + self.conn = psycopg2.connect(dsn) self.curs = self.conn.cursor() self.DATE = psycopg2._psycopg.PYDATE self.TIME = psycopg2._psycopg.PYTIME @@ -293,7 +293,7 @@ class mxDateTimeTests(unittest.TestCase, CommonDatetimeTestsMixin): """Tests for the mx.DateTime based date handling in psycopg2.""" def setUp(self): - self.conn = psycopg2.connect(tests.dsn) + self.conn = psycopg2.connect(dsn) self.curs = self.conn.cursor() self.DATE = psycopg2._psycopg.MXDATE self.TIME = psycopg2._psycopg.MXTIME |