From 415c50456779b663c780fb5c0eb8bac8f2cfc5bd Mon Sep 17 00:00:00 2001 From: Pepijn Date: Thu, 9 Apr 2026 15:12:52 +0200 Subject: [PATCH] fix(test): use SyncVectorEnv in test_base_create_envs AsyncVectorEnv spawns new subprocesses that do not inherit the in-process gym registration created by the test. Pass use_async_envs=False since this test validates dispatch logic, not async parallelism. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/envs/test_dispatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/envs/test_dispatch.py b/tests/envs/test_dispatch.py index 5bd2827f3..8e2a93601 100644 --- a/tests/envs/test_dispatch.py +++ b/tests/envs/test_dispatch.py @@ -87,7 +87,7 @@ def test_base_create_envs(): return {} try: - envs = _Env().create_envs(n_envs=2) + envs = _Env().create_envs(n_envs=2, use_async_envs=False) assert "_dispatch_base_test" in envs env = envs["_dispatch_base_test"][0] assert isinstance(env, gym.vector.VectorEnv)