MCPcopy Create free account
hub / github.com/ahalev/python-microgrid / test_obs_values_after_reset

Method test_obs_values_after_reset

tests/envs/test_base.py:63–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61
62 @pass_if_parent
63 def test_obs_values_after_reset(self):
64 env = deepcopy(self.env)
65 obs = env.reset()
66
67 if self.observation_keys:
68 expected_obs = env.state_series(normalized=True).loc[pd.IndexSlice[:, :, self.observation_keys]].values
69 else:
70 expected_obs = env.state_series(normalized=True).values
71
72 self.assertEqual(obs, expected_obs)
73
74 @pass_if_parent
75 def test_state_series_values(self):

Callers

nothing calls this directly

Calls 3

state_seriesMethod · 0.80
assertEqualMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected