test/test_speed.py
def _check_speed(time_per_run, number=4, run_warm=True):
    """ Speed checks should typically be very tolerant. Some machines are
    faster than others, but the tests should still pass. These tests are
    here to assure that certain effects that kill medi performance are not
    reintroduced to Medi."""
    def decorated(func):
        @functools.wraps(func)
        def wrapper(Script, **kwargs):
            if run_warm:
                func(Script=Script, **kwargs)
            first = time.time()
            for i in range(number):
                func(Script=Script, **kwargs)
            single_time = (time.time() - first) / number
            message = 'speed issue %s, %s' % (func, single_time)
            assert single_time < time_per_run, message
        return wrapper
    return decorated
 Speed checks should typically be very tolerant. Some machines are
    faster than others, but the tests should still pass. These tests are
    here to assure that certain effects that kill medi performance are not
    reintroduced to Medi.
Speed checks should typically be very tolerant. Some machines are
faster than others, but the tests should still pass. These tests are
here to assure that certain effects that kill medi performance are not
reintroduced to Medi.
Speed checks should typically be very tolerant . Some machines are faster than others but the tests should still pass . These tests are here to assure that certain effects that kill medi performance are not reintroduced to Medi .
def _check_speed(time_per_run, number=4, run_warm=True):
    def decorated(func):
        @functools.wraps(func)
        def wrapper(Script, **kwargs):
            if run_warm:
                func(Script=Script, **kwargs)
            first = time.time()
            for i in range(number):
                func(Script=Script, **kwargs)
            single_time = (time.time() - first) / number
            message = 'speed issue %s, %s' % (func, single_time)
            assert single_time < time_per_run, message
        return wrapper
    return decorated
def _check_speed ( time_per_run , number = 4 , run_warm = True ) : def decorated ( func ) : @ functools . wraps ( func ) def wrapper ( Script , ** kwargs ) : if run_warm : func ( Script = Script , ** kwargs ) first = time . time ( ) for i in range ( number ) : func ( Script = Script , ** kwargs ) single_time = ( time . time ( ) - first ) / number message = 'speed issue %s, %s' % ( func , single_time ) assert single_time < time_per_run , message return wrapper return decorated
Speed checks should typically be very tolerant.
Speed checks should typically be very tolerant .
""" Speed checks should typically be very tolerant. Some machines are
    faster than others, but the tests should still pass. These tests are
    here to assure that certain effects that kill medi performance are not
    reintroduced to Medi."""
time_per_run
number
run_warm