Skip to content

Commit

Permalink
Merge pull request #290 from huangshiyu13/main
Browse files Browse the repository at this point in the history
update
  • Loading branch information
huangshiyu13 committed Jan 2, 2024
2 parents 2757b62 + 72dc248 commit 7419e43
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/test_env/test_offline_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def gen_data(total_episode, data_save_path):


@pytest.fixture(scope="function")
def config(request, tmp_path):
def config(tmp_path):
total_episode = 5
data_save_path = tmp_path / "data.pkl"
gen_data(total_episode, data_save_path)
Expand All @@ -66,10 +66,15 @@ def config(request, tmp_path):
return cfg


@pytest.fixture(scope="function", params=[True, False])
def asynchronous(request):
return request.param


@pytest.mark.unittest
def test_offline_env(config):
def test_offline_env(asynchronous, config):
# create environment
env = make("OfflineEnv", env_num=1, cfg=config, asynchronous=True)
env = make("OfflineEnv", env_num=2, cfg=config, asynchronous=asynchronous)

for ep_index in range(10):
done = False
Expand Down

0 comments on commit 7419e43

Please sign in to comment.