Tests: add world load benchmark (#2768)

This commit is contained in:
Fabian Dill
2024-02-04 09:09:07 +01:00
committed by GitHub
parent 33237bd5c0
commit 6c19bc42bb
6 changed files with 181 additions and 128 deletions

View File

@@ -0,0 +1,16 @@
import sys
import os
def change_home():
"""Allow scripts to run from "this" folder."""
old_home = os.path.dirname(__file__)
sys.path.remove(old_home)
new_home = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
os.chdir(new_home)
sys.path.append(new_home)
# fallback to local import
sys.path.append(old_home)
from Utils import local_path
local_path.cached_path = new_home