From 96ee77cd096f94613e3f98f7b7c179167b05877a Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Fri, 1 Jun 2007 04:55:17 +0000 Subject: [PATCH] fix running tests on Windows --- README.unittests | 14 ++++++++++---- test/testbase.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) 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 -- 2.47.2