Skip to content

Commit 4e4cdd7

Browse files
committed
fix the two broken tests on circleci
1 parent 0692f75 commit 4e4cdd7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

grid2op/Environment/baseEnv.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4086,9 +4086,11 @@ def _aux_gen_classes(cls_other, sys_path, _add_class_output=False):
40864086
env_path, env_nm = os.path.split(sub_repo)
40874087
if env_path not in sys.path:
40884088
sys.path.append(env_path)
4089+
if not package_path in sys.path:
4090+
sys.path.append(package_path)
40894091
super_supermodule = importlib.import_module(env_nm)
4090-
tmp_nm = f".{tmp_nm}"
4091-
sub_repo_mod = env_nm
4092+
nm_ = f"{tmp_nm}.{nm_}"
4093+
tmp_nm = env_nm
40924094
super_module = importlib.import_module(tmp_nm, package=sub_repo_mod)
40934095
add_sys_path = os.path.dirname(super_module.__file__)
40944096
if not add_sys_path in sys.path:
@@ -4097,7 +4099,6 @@ def _aux_gen_classes(cls_other, sys_path, _add_class_output=False):
40974099
if f"{tmp_nm}.{nm_}" in sys.modules:
40984100
cls_res = getattr(sys.modules[f"{tmp_nm}.{nm_}"], cls_other.__name__)
40994101
return str_import, cls_res
4100-
41014102
try:
41024103
module = importlib.import_module(f".{nm_}", package=tmp_nm)
41034104
except ModuleNotFoundError as exc_:

0 commit comments

Comments
 (0)