コード例 #1
0
ファイル: caliendo_test.py プロジェクト: pahko/caliendo
        def test(waittime):
            time.sleep(waittime)
            cs = CallStack(gkeyword)
            cache(gkeyword, kwargs={ 'x': 1, 'y': 2, 'z': 3 }, call_stack=cs, callback=callback)
            cs.save()


            os._exit(0)
コード例 #2
0
 def test(waittime):
     time.sleep(waittime)
     cs = CallStack(gkeyword)
     val = cache(gkeyword,
                 kwargs={
                     'x': 1,
                     'y': 2,
                     'z': 3
                 },
                 call_stack=cs,
                 callback=callback)
     cs.save()
     os._exit(0)
コード例 #3
0
ファイル: patch.py プロジェクト: buzzfeed/caliendo
    def patch_with(*args, **kwargs):
        if side_effect != UNDEFINED:
            return execute_side_effect(side_effect, args, kwargs)
        if rvalue != UNDEFINED:
            return rvalue

        return cache(
            method_to_patch,
            args=args,
            kwargs=kwargs,
            ignore=ignore,
            call_stack=context.stack,
            callback=callback,
            subsequent_rvalue=subsequent_rvalue,
        )
コード例 #4
0
ファイル: caliendo_test.py プロジェクト: mplacona/caliendo
 def test(fh):
     result = cache( mixed, args=(1,2), kwargs={'z': 3 } )
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #5
0
ファイル: caliendo_test.py プロジェクト: mplacona/caliendo
 def test(fh):
     result = cache( keyword, kwargs={ 'x': 1, 'y': 2, 'z': 3 } )
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #6
0
ファイル: caliendo_test.py プロジェクト: mplacona/caliendo
 def test(fh):
     result = cache( positional, args=(1,2,3) )
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #7
0
 def test(fh):
     result = cache(mixed, args=(1, 2), kwargs={'z': 3})
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #8
0
 def test(fh):
     result = cache(keyword, kwargs={'x': 1, 'y': 2, 'z': 3})
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #9
0
 def test(fh):
     result = cache(positional, args=(1, 2, 3))
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #10
0
ファイル: caliendo_test.py プロジェクト: buzzfeed/caliendo
 def test(fh):
     result = cache(keyword, kwargs={"x": 1, "y": 2, "z": 3})
     fh.write(str(result == 6))
     fh.close()
     os._exit(0)
コード例 #11
0
ファイル: caliendo_test.py プロジェクト: buzzfeed/caliendo
 def test(waittime):
     time.sleep(waittime)
     cs = CallStack(gkeyword)
     val = cache(gkeyword, kwargs={"x": 1, "y": 2, "z": 3}, call_stack=cs, callback=callback)
     cs.save()
     os._exit(0)