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

Method test_get_obs

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

Source from the content-addressed store, hash-verified

87
88 @pass_if_parent
89 def test_get_obs(self):
90 env = deepcopy(self.env)
91 obs = env._get_obs()
92
93 if self.observation_keys:
94 expected_obs = env.state_series(normalized=True).loc[pd.IndexSlice[:, :, self.observation_keys]].values
95 else:
96 expected_obs = env.state_series(normalized=True).values
97
98 self.assertEqual(obs, expected_obs)
99
100 @pass_if_parent
101 def test_steps(self):

Callers

nothing calls this directly

Calls 3

_get_obsMethod · 0.80
state_seriesMethod · 0.80
assertEqualMethod · 0.80

Tested by

no test coverage detected