소스 검색

fix tox build for environment-python != containing-python in yet-another instance

this instance: the repository worktree is *not* named borg.
Marian Beermann 9 년 전
부모
커밋
4f1157c3a4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      conftest.py

+ 2 - 1
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 @@ import sys
 
 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: