robotframework-2.7.7.utest.running.thread_resources.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robotframework Show documentation
Show all versions of robotframework Show documentation
High level test automation framework
The newest version!
import os, time
class MyException(Exception):
pass
def passing(*args):
pass
def sleeping(s):
seconds = s
while seconds > 0:
time.sleep(min(seconds, 0.1))
seconds -= 0.1
os.environ['ROBOT_THREAD_TESTING'] = str(s)
return s
def returning(arg):
return arg
def failing(msg='xxx'):
raise MyException, msg
if os.name == 'java':
from java.lang import Error
def java_failing(msg='zzz'):
raise Error(msg)