Index: functional/test_utils.py |
=================================================================== |
--- functional/test_utils.py (revision 71393) |
+++ functional/test_utils.py (working copy) |
@@ -9,8 +9,10 @@ |
import os |
import smtplib |
import types |
+import logging |
Nirnimesh
2011/01/15 01:46:28
In dictionary order, logging goes before types, sm
|
import pyauto_functional |
+import pyauto |
import pyauto_utils |
@@ -215,3 +217,17 @@ |
test.assertTrue(s in content_string, s) |
for s in nothave_list: |
test.assertTrue(s not in content_string) |
+ |
+ |
+def _CallFunctionWithNewTimeout(self, new_timeout, function): |
Nirnimesh
2011/01/15 01:46:28
Now that it's a helper function to be used in mult
|
+ """Sets the timeout to |new_timeout| and calls |function|. |
+ |
+ This method resets the timeout before returning. |
+ """ |
+ timeout_changer = pyauto.PyUITest.CmdExecutionTimeoutChanger( |
+ self, new_timeout) |
+ logging.info('Automation execution timeout has been changed to %d. ' |
+ 'If the timeout is large the test might appear to hang.' |
+ % new_timeout) |
+ function() |
+ del timeout_changer |