From cdbb2cf7b769eb6614d63bc2233e1ba01635f5dc Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:47:22 +0200 Subject: [PATCH] Core: fix unittest world discovery (#2262) --- test/__init__.py | 3 ++- test/worlds/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/__init__.py b/test/__init__.py index 03716a10..37ebe3f6 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -13,5 +13,6 @@ ModuleUpdate.update_ran = True # don't upgrade import Utils -Utils.local_path.cached_path = pathlib.Path(__file__).parent.parent +file_path = pathlib.Path(__file__).parent.parent +Utils.local_path.cached_path = file_path Utils.user_path() # initialize cached_path diff --git a/test/worlds/__init__.py b/test/worlds/__init__.py index d1817cc6..cf396111 100644 --- a/test/worlds/__init__.py +++ b/test/worlds/__init__.py @@ -1,7 +1,7 @@ def load_tests(loader, standard_tests, pattern): import os import unittest - from ..TestBase import file_path + from .. import file_path from worlds.AutoWorld import AutoWorldRegister suite = unittest.TestSuite()