Skip to content

Commit

Permalink
Test of Python time converter weakened. Works in all time zones now.
Browse files Browse the repository at this point in the history
  • Loading branch information
vernondcole committed Feb 14, 2009
1 parent 5980459 commit 003bd50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions adodbapi/tests/adodbapitest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Unit tests for adodbapi version 2.2.6"""
""" Unit tests for adodbapi version 2.2.6 (d)"""
"""
adodbapi - A python DB API 2.0 interface to Microsoft ADO
Expand Down Expand Up @@ -670,8 +670,9 @@ def testCOMDate(self):

def testDateObjectFromCOMDate(self):
cmd=self.tc.DateObjectFromCOMDate(37435.7604282)
t1=time.gmtime(time.mktime((2002,6,28,12,14,1, 4,31+28+31+30+31+28,-1)))
t2=time.gmtime(time.mktime((2002,6,28,12,16,1, 4,31+28+31+30+31+28,-1)))
t1=time.gmtime(time.mktime((2002,6,28,0,14,1, 4,31+28+31+30+31+28,-1)))
#there are errors in the implementation of gmtime which we ignore
t2=time.gmtime(time.mktime((2002,6,29,12,14,2, 4,31+28+31+30+31+28,-1)))
assert t1<cmd<t2, '"%s" should be about 2002-6-28 12:15:01'%repr(cmd)

def testDate(self):
Expand Down
5 changes: 2 additions & 3 deletions adodbapi/tests/adodbapitestconfig.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configure this in order to run the testcases.
"adodbapitestconfig.py v 2.2.5"
"adodbapitestconfig.py v 2.2.6"

import os
import sys
Expand Down Expand Up @@ -35,7 +35,6 @@
if doAccessTest:
_accessdatasource = None #set to None for automatic creation
#r"C:\Program Files\Microsoft Office\Office\Samples\northwind.mdb;"
#Typically C:\Program Files
if _accessdatasource == None:
# following setup code borrowed from pywin32 odbc test suite
# kindly contributed by Frank Millman.
Expand Down Expand Up @@ -79,7 +78,7 @@
# connStrAccess = "Driver={Microsoft Access Driver (*.mdb)};db=%s;Uid=;Pwd=;" + _accessdatasource

if doSqlServerTest:
_computername=".\SQLEXPRESS" #or name of computer with SQL Server
_computername=r".\SQLEXPRESS" #or name of computer with SQL Server
_databasename="Northwind" #or something else
#_username="guest"
#_password="12345678"
Expand Down

0 comments on commit 003bd50

Please sign in to comment.