summaryrefslogtreecommitdiff
path: root/test/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/conftest.py')
-rwxr-xr-xtest/conftest.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/conftest.py b/test/conftest.py
index 590b35700..36dfaa792 100755
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -9,10 +9,12 @@ installs SQLAlchemy's testing plugin into the local environment.
import sys
import os
-for pth in ['../lib']:
- sys.path.append(
- os.path.join(os.path.dirname(os.path.abspath(__file__)), pth))
-
+if not sys.flags.no_user_site:
+ sys.path.insert(
+ 0,
+ os.path.join(
+ os.path.dirname(os.path.abspath(__file__)), '..', 'lib')
+ )
# use bootstrapping so that test plugins are loaded
# without touching the main library before coverage starts