Tests: now autoload tests from /worlds/*/test (#1318)

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
Fabian Dill
2022-12-11 13:15:23 +01:00
committed by GitHub
parent ec45479c52
commit 2dcfbff751
81 changed files with 715 additions and 683 deletions

View File

@@ -99,7 +99,7 @@ def local_path(*path: str) -> str:
local_path.cached_path = os.path.dirname(os.path.abspath(sys.argv[0]))
else:
import __main__
if hasattr(__main__, "__file__"):
if hasattr(__main__, "__file__") and os.path.isfile(__main__.__file__):
# we are running in a normal Python environment
local_path.cached_path = os.path.dirname(os.path.abspath(__main__.__file__))
else: