Skip to content

Commit

Permalink
Use multiprocessing.get_all_start_methods() in test_async_with_dynami…
Browse files Browse the repository at this point in the history
…cally_registered_env (#1222)

Co-authored-by: Mark Towers <[email protected]>
  • Loading branch information
traversaro and pseudo-rnd-thoughts authored Oct 20, 2024
1 parent 3cd59f4 commit af367bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/envs/registration/test_make_vec.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Testing of the `gym.make_vec` function."""

import multiprocessing
import re

import pytest
Expand Down Expand Up @@ -236,7 +237,7 @@ def test_make_vec_with_spec(env_id: str, kwargs: dict):
recreated_envs.close()


@pytest.mark.parametrize("ctx", [None, "spawn", "fork", "forkserver"])
@pytest.mark.parametrize("ctx", [None] + multiprocessing.get_all_start_methods())
def test_async_with_dynamically_registered_env(ctx):
gym.register("TestEnv-v0", CartPoleEnv)

Expand Down

0 comments on commit af367bb

Please sign in to comment.