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

Method test_steps

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

Source from the content-addressed store, hash-verified

99
100 @pass_if_parent
101 def test_steps(self):
102 env = deepcopy(self.env)
103
104 env.reset()
105
106 for j in range(10):
107 with self.subTest(step=j):
108 obs, _, _, _ = env.step(env.action_space.sample())
109 self.assertTrue((obs >= 0).all())
110 self.assertTrue((obs <= 1).all())
111
112
113class ObsKeysNoNetLoadParent(Parent):

Callers

nothing calls this directly

Calls 3

resetMethod · 0.45
stepMethod · 0.45
sampleMethod · 0.45

Tested by

no test coverage detected