From 4f1157c3a49ee68c350dc8b8aa68e9dbc7f20093 Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Tue, 24 May 2016 20:57:52 +0200 Subject: [PATCH] fix tox build for environment-python != containing-python in yet-another instance this instance: the repository worktree is *not* named borg. --- conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 6ca799a3e..450ff10a7 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,4 @@ +import os.path import sys # This is a hack to fix path problems because "borg" (the package) is in the source root. @@ -11,7 +12,7 @@ original_path = list(sys.path) for entry in original_path: - if entry == '' or entry.endswith('/borg'): + if entry == '' or entry == os.path.dirname(__file__): sys.path.remove(entry) try: