(self)
| 41 | self.assertTrue(all(v == [None] for v in action.values())) |
| 42 | |
| 43 | def test_action_space(self): |
| 44 | microgrid = get_modular_microgrid() |
| 45 | action = microgrid.microgrid_action_space.sample() |
| 46 | |
| 47 | for module_name, module_list in microgrid.modules.iterdict(): |
| 48 | for module_num, module in enumerate(module_list): |
| 49 | if 'controllable' in module.module_type: |
| 50 | with self.subTest(module_name=module_name, module_num=module_num): |
| 51 | self.assertIn(action[module_name][module_num], module.action_space) |
| 52 | |
| 53 | def test_action_space_normalize(self): |
| 54 | microgrid = get_modular_microgrid() |
nothing calls this directly
no test coverage detected