ordered icon indicating copy to clipboard operation
ordered copied to clipboard

Can't resolve globals within ordered context

Open grandrew opened this issue 4 years ago • 0 comments

See test file at tests/test_global_var.py

import ordered
import pytest

x = 0
def inc():
    global x
    x += 1

def run_inc():
    global x
    with ordered.orderedcontext():
        while x != 1:
            ordered.choice()()
    pass  # required due to current Python limitation


def test_endofframe():
    "Setting the breakpoint to line 13 should work"
    run_inc()

grandrew avatar Aug 16 '21 01:08 grandrew