[SQL-CVS] r692 - trunk/SQLObject/sqlobject/tests
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2005-03-29 16:48:15
|
Author: phd Date: 2005-03-29 16:48:12 +0000 (Tue, 29 Mar 2005) New Revision: 692 Modified: trunk/SQLObject/sqlobject/tests/dbtest.py Log: Applied fix 1171905. Modified: trunk/SQLObject/sqlobject/tests/dbtest.py =================================================================== --- trunk/SQLObject/sqlobject/tests/dbtest.py 2005-03-29 16:30:20 UTC (rev 691) +++ trunk/SQLObject/sqlobject/tests/dbtest.py 2005-03-29 16:48:12 UTC (rev 692) @@ -2,18 +2,25 @@ The framework for making database tests. """ +import sys import os import re import sqlobject from py.test import raises +if sys.platform[:3] == "win": + def getcwd(): + return os.getcwd().replace(':', '|') +else: + getcwd = os.getcwd + connectionShortcuts = { 'mysql': 'mysql://test@localhost/test', 'dbm': 'dbm:///data', 'postgres': 'postgres:///test', 'postgresql': 'postgres:///test', 'pygresql': 'pygresql://localhost/test', - 'sqlite': 'sqlite:///%s/data/sqlite.data' % os.getcwd(), + 'sqlite': 'sqlite:///%s/data/sqlite.data' % getcwd(), 'sybase': 'sybase://test:test123@sybase/test?autoCommit=0', 'firebird': 'firebird://sysdba:masterkey@localhost/var/lib/firebird/data/test.gdb', } @@ -64,7 +71,7 @@ installOrClear(soClasses) return soClasses -installedDBFilename = os.path.join(os.getcwd(), 'dbs_data.tmp') +installedDBFilename = os.path.join(getcwd(), 'dbs_data.tmp') installedDBTracker = sqlobject.connectionForURI( 'sqlite:///' + installedDBFilename) |