All Downloads are FREE. Search and download functionalities are using the official Maven repository.

robotframework-2.7.7.utest.running.thread_resources.py Maven / Gradle / Ivy

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)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy