summaryrefslogtreecommitdiffstats
path: root/conftest.py
diff options
context:
space:
mode:
authorMarian Beermann <public@enkore.de>2016-11-13 11:19:58 +0100
committerMarian Beermann <public@enkore.de>2016-11-13 11:20:00 +0100
commit960c42193acdab214217dd8a472f7f28d7ca5153 (patch)
treee5b7291f3a2a3bcffe38bdbf30d765457d1ca0cb /conftest.py
parent1a0218b50f1e90f4525e1f3f36db34bbda244fb6 (diff)
fix tox build for environment-python != containing-python in yet-another instance
this instance: the repository worktree is *not* named borg. Cherry pick of 4f1157c into 1.0-maint due to f3efcdb TODO removed since we already did that after 1.0-maint, but 1.0-maint will never receive the change.
Diffstat (limited to 'conftest.py')
-rw-r--r--conftest.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/conftest.py b/conftest.py
index d80aed4c1..d5423660b 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,4 +1,5 @@
import os
+import os.path
import sys
import pytest
@@ -10,12 +11,10 @@ import pytest
# The workaround is to remove entries pointing there from the path and check whether "borg"
# is still importable. If it is not, then it has not been installed in the environment
# and the entries are put back.
-#
-# TODO: After moving the package to src/: remove this.
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: