Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamc committed Jul 1, 2022
1 parent 12afcaf commit bd84c25
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/test_CARLEnv.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,19 @@ def test_dict_observation_space(self):
next_obs, reward, done, info = env.step(action=action)
env.close()

def test_state_context_feature_population(self):
env = ( # noqa: F841 local variable is assigned to but never used
CARLPendulumEnv(
contexts={},
hide_context=False,
add_gaussian_noise_to_context=False,
gaussian_noise_std_percentage=0.01,
state_context_features=None,
scale_context_features="no",
)
)
self.assertIsNotNone(env.state_context_features)


class TestEpisodeTermination(unittest.TestCase):
def test_episode_termination(self):
Expand Down Expand Up @@ -309,19 +322,6 @@ def test_context_mask(self):
self.assertTrue(len(s_c) == len(list(env.default_context.keys())) - 2)
self.assertTrue(len(forbidden_in_context) == 0)

def test_state_context_feature_population(self):
env = ( # noqa: F841 local variable is assigned to but never used
CARLPendulumEnv(
contexts={},
hide_context=False,
add_gaussian_noise_to_context=False,
gaussian_noise_std_percentage=0.01,
state_context_features=None,
scale_context_features="no",
)
)
self.assertIsNotNone(env.state_context_features)


class TestContextSelection(unittest.TestCase):
@staticmethod
Expand Down

0 comments on commit bd84c25

Please sign in to comment.