def ex(): return Ex("state")._sct_copy(lambda state, x: state + x)("x")
def test_ex_sct_copy_pos(addx): assert Ex("state")._sct_copy(addx)("x")._state == "statex"
def test_state_linking_root_creator(state): def diagnose(end_state): assert end_state.creator is None f = F(attr_scts={"diagnose": diagnose}) Ex(state) >> f.diagnose()
def test_ex_sct_copy_kw(addx): assert Ex("state")._sct_copy(addx)(x="x")._state == "statex"
def test_check_file_fchain(state, temp_file): f = F(attr_scts={"check_file": cf.check_file}) Ex(state) >> f.check_file(temp_file.name)