self.start_tests(name="modules")
// Remove directory if exists
if os.path.exists(path=self.__class__.directory):
for filename in os.listdir(path=self.__class__.directory):
os.remove(path=os.path.join(self.__class__.directory, filename))
os.rmdir(path=self.__class__.directory)
After Change
states, terminal, reward = environment.execute(actions=actions)
agent.observe(terminal=terminal, reward=reward)
files = set(os.listdir(path=directory))
self.assertTrue(len(files), 2 * len(agent.model.this_submodules))
for module in agent.model.this_submodules:
self.assertTrue(module.name + ".index" in files)
self.assertTrue(module.name + ".data-00000-of-00001" in files)