Use patch.object to allow relative imports

Issue STAR-322.
This commit is contained in:
Daniel Schiavini 2019-01-17 12:58:23 +01:00
parent b51317b4f3
commit badb0b0ca9
4 changed files with 19 additions and 16 deletions

View file

@ -29,6 +29,7 @@ def where(exe_name: str, search_path: str = os.getenv("PATH")) -> str:
def findModules(path):
return ["UM3NetworkPrinting"]
result = []
for entry in os.scandir(path):
if entry.is_dir() and os.path.exists(os.path.join(path, entry.name, "__init__.py")):