Revision: 4129
Author: jussi.ao.malinen
Date: Fri Sep 24 03:52:05 2010
Log: dialogs and timeouts are now supported on python only if the operating
system is linux.
http://code.google.com/p/robotframework/source/detail?r=4129
Modified:
/trunk/atest/resources/TestHelper.py
/trunk/atest/robot/standard_libraries/dialogs/dialogs.txt
/trunk/src/robot/libraries/Dialogs.py
=======================================
--- /trunk/atest/resources/TestHelper.py Thu Sep 23 05:22:52 2010
+++ /trunk/atest/resources/TestHelper.py Fri Sep 24 03:52:05 2010
@@ -39,5 +39,5 @@
def running_on_python(self, interpreter):
return not self.running_on_jython(interpreter)
- def running_on_windows(self):
- return os.path.sep == '\\'
+ def running_on_linux(self):
+ return 'linux' in sys.platform
=======================================
--- /trunk/atest/robot/standard_libraries/dialogs/dialogs.txt Thu Sep 23
05:26:29 2010
+++ /trunk/atest/robot/standard_libraries/dialogs/dialogs.txt Fri Sep 24
03:52:05 2010
@@ -24,8 +24,8 @@
Dialog and timeout
${on python} = Running On Python ${INTERPRETER}
- ${on windows} = Running On Windows
- ${message} = Set Variable If ${on python} and ${on windows}
- ... Dialogs library cannot be used with timeout on Windows with
Python.
+ ${on linux} = Running On Linux
+ ${message} = Set Variable If ${on python} and not ${on linux}
+ ... Dialogs library can be used with timeout only on Jython and
Python on Linux.
... Test timeout 1 second exceeded.
Check Test Case ${TESTNAME} FAIL ${message}
=======================================
--- /trunk/src/robot/libraries/Dialogs.py Fri Sep 24 01:38:01 2010
+++ /trunk/src/robot/libraries/Dialogs.py Fri Sep 24 03:52:05 2010
@@ -89,9 +89,9 @@
def _prevent_execution_with_timeouts(method):
def _check_timeout(*args):
- if os.name == 'nt' and
currentThread().getName() != 'MainThread':
- raise AssertionError("Dialogs library cannot be used with "
- "timeout on Windows with Python.")
+ if 'linux' not in sys.platform and
currentThread().getName() != 'MainThread':
+ raise AssertionError("Dialogs library can be used with
timeout " +
+ "only on Jython and Python on Linux.")
return method(*args)
return _check_timeout