From: Jonathan Ellis Date: Fri, 1 Jun 2007 04:55:17 +0000 (+0000) Subject: fix running tests on Windows X-Git-Tag: rel_0_3_8~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ee77cd096f94613e3f98f7b7c179167b05877a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fix running tests on Windows --- diff --git a/README.unittests b/README.unittests index 617d5fd6f0..729cd42a5d 100644 --- a/README.unittests +++ b/README.unittests @@ -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 ----------------- diff --git a/test/testbase.py b/test/testbase.py index 9ee79da20d..fab8da9e42 100644 --- a/test/testbase.py +++ b/test/testbase.py @@ -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