def default_id(a):
    f = Foo()
    f.a = a
    with InlineCheckpoint(watch=["f.a"], produce=["f.b"]):
        R()
        f.b = f.a
    return f.b
def no_watch():
    f = Foo()
    with InlineCheckpoint(watch=[], produce=["f.a"]):
        R()
        f.a = 1

    return f.a
def produce_two():
    f = Foo()
    with InlineCheckpoint(watch=[], produce=["f.a", "f.b"]):
        R()
        f.a = 1
        f.b = 2
    return f.a, f.b
def strange_statement_1(a, b):
    f = Foo()
    f.c = "reset"

    with InlineCheckpoint(watch=('a', "b"), produce=["f.c"]):
        R()
        f.c = a + b

    return f.c
def add_give_c_in_obj(a, b):
    f = Foo()
    f.c = "reset"

    with InlineCheckpoint(watch=["a", "b"], produce=["f.c"]):
        R()
        f.c = a + b

    return f.c
def watch_obj_value(a):
    f = Foo()
    f.a = a

    with InlineCheckpoint(watch=["f.a"], produce=["f.c"]):
        R()
        f.c = a

    return f.c
def multi_level(a):
    f = Foo()
    f.f = Foo()
    f.f.f = Foo()
    f.f.f.a = a

    with InlineCheckpoint(watch=["f.f.f.a"], produce=["f.f.b"]):
        R()
        f.f.b = f.f.f.a
    return f.f.b
예제 #8
0
 def class_method(cls, a):
     R()
     return a
def add_give_c(a, b):
    c = "reset"
    with InlineCheckpoint(watch=["a", "b"], produce=["c"]):
        R()
        c = a + b
    return c
예제 #10
0
def adding(a, b):
    R()
    return a + b
예제 #11
0
def adding_with_default(a, b=3):
    R()
    return a + b
def fail_2():
    f = Foo()
    with InlineCheckpoint(watch=["f.a"], produce=["b"]):
        R()
        b = f.a
    return b
def fail_1():
    with InlineCheckpoint(watch=["a"], produce=["b"]):
        R()
        b = a
    return b
예제 #14
0
 def with_args(self, b):
     R()
     return self.a + b
예제 #15
0
def empty():
    R()
    return 0
예제 #16
0
 def no_args(self):
     R()
     return self.a
예제 #17
0
def return_attr_a(obj):
    R()
    return obj.a
예제 #18
0
def always_return_1(*args, **kwargs):
    R()
    return 1
예제 #19
0
def return_input(val):
    R()
    return val
예제 #20
0
def adding_with_ignore(a, b=3):
    R()
    return a + b