]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix running tests on Windows
authorJonathan Ellis <jbellis@gmail.com>
Fri, 1 Jun 2007 04:55:17 +0000 (04:55 +0000)
committerJonathan Ellis <jbellis@gmail.com>
Fri, 1 Jun 2007 04:55:17 +0000 (04:55 +0000)
README.unittests
test/testbase.py

index 617d5fd6f07a04d0eb33a4f621a33621961555c5..729cd42a5d5755dec2048517a1b29f2b841aafcd 100644 (file)
@@ -9,13 +9,19 @@ Python 2.4 or greater is required since the unit tests use decorators.
 
 cd into the SQLAlchemy distribution directory.
 
-Set up the PYTHONPATH:
+Set up the PYTHONPATH.  In bash:
 
     export PYTHONPATH=./test/
 
-The unittest framework will automatically prepend './lib/' to sys.path.  this forces the local 
-version of SQLAlchemy to be used, bypassing any setuptools-installed installations 
-(setuptools places .egg files ahead of plain directories, even if on PYTHONPATH, unfortunately).
+On windows:
+
+    set PYTHONPATH=test\
+
+The unittest framework will automatically prepend the lib directory to
+sys.path.  This forces the local version of SQLAlchemy to be used,
+bypassing any setuptools-installed installations (setuptools places
+.egg files ahead of plain directories, even if on PYTHONPATH,
+unfortunately).
 
 RUNNING ALL TESTS
 -----------------
index 9ee79da20dc0e730f308e56f6fa3647ab456fe31..fab8da9e421dc383a6813a92d0cc2c3b4533f36c 100644 (file)
@@ -1,6 +1,6 @@
 import sys
-sys.path.insert(0, './lib/')
 import os, unittest, StringIO, re, ConfigParser
+sys.path.insert(0, os.path.join(os.getcwd(), 'lib'))
 import sqlalchemy
 from sqlalchemy import sql, engine, pool
 import sqlalchemy.engine.base as base