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
Exemplo n.º 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
Exemplo n.º 10
0
def adding(a, b):
    R()
    return a + b
Exemplo n.º 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
Exemplo n.º 14
0
 def with_args(self, b):
     R()
     return self.a + b
Exemplo n.º 15
0
def empty():
    R()
    return 0
Exemplo n.º 16
0
 def no_args(self):
     R()
     return self.a
Exemplo n.º 17
0
def return_attr_a(obj):
    R()
    return obj.a
Exemplo n.º 18
0
def always_return_1(*args, **kwargs):
    R()
    return 1
Exemplo n.º 19
0
def return_input(val):
    R()
    return val
Exemplo n.º 20
0
def adding_with_ignore(a, b=3):
    R()
    return a + b