mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Tests: add world load benchmark (#2768)
This commit is contained in:
16
test/benchmark/path_change.py
Normal file
16
test/benchmark/path_change.py
Normal 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
|
Reference in New Issue
Block a user