Use `_try_until_no_errors also for test_tool_reload_when_macro_is_altered` unit test

This commit is contained in:
Nicola Soranzo
2019-03-04 16:45:11 +00:00
parent d3652f871a
commit 294c7b6eeb
+5 -3
View File
@@ -195,10 +195,12 @@ class ToolBoxTestCase(BaseToolBoxTestCase):
macro_path = tool._macro_paths[0]
with open(macro_path, 'w') as macro_out:
macro_out.write(SIMPLE_MACRO.substitute(tool_version="3.0"))
time.sleep(1.5)
tool = self.app.toolbox.get_tool("tool_with_macro")
assert tool.version == "3.0"
def check_tool_macro():
tool = self.app.toolbox.get_tool("tool_with_macro")
assert tool.version == "3.0"
self._try_until_no_errors(check_tool_macro)
def test_tool_reload_for_broken_tool(self):
self._init_tool(filename="simple_tool.xml", version="1.0")