From 24204b181bc289529f3c2aa0451785b1b4a507e8 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 21 May 2016 19:18:54 +0200 Subject: [PATCH] remove conftest sys.path hack, fixes #1072 not needed any more as the code is now below src/. --- conftest.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/conftest.py b/conftest.py index 6ca799a3e..44ff5cde9 100644 --- a/conftest.py +++ b/conftest.py @@ -1,24 +1,3 @@ -import sys - -# This is a hack to fix path problems because "borg" (the package) is in the source root. -# When importing the conftest an "import borg" can incorrectly import the borg from the -# source root instead of the one installed in the environment. -# 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'): - sys.path.remove(entry) - -try: - import borg -except ImportError: - sys.path = original_path - from borg.logger import setup_logging # Ensure that the loggers exist for all tests