def test_complex(): store, space = jug.jug.init('jug/tests/jugfiles/tasklets.py', 'dict_store') simple_execute() store, space = jug.jug.init('jug/tests/jugfiles/tasklets.py', store) opts = Options(default_options) opts.invalid_name = space['t'].name h = space['t'].hash() assert store.can_load(h) jug.jug.invalidate(store, opts) assert not store.can_load(h)
def test_complex(): store, space = jug.jug.init('jug/tests/jugfiles/tasklets.py', 'dict_store') simple_execute() store, space = jug.jug.init('jug/tests/jugfiles/tasklets.py', store) opts = Options(default_options) opts.invalid_name = space['t'].name h = space['t'].hash() assert store.can_load(h) jug.jug.invalidate(store, opts) assert not store.can_load(h)
def test_complex(): jugfile = os.path.join(_jugdir, 'tasklets.py') store, space = jug.jug.init(jugfile, 'dict_store') simple_execute() store, space = jug.jug.init(jugfile, store) opts = Options(default_options) opts.invalid_name = space['t'].name h = space['t'].hash() assert store.can_load(h) jug.subcommands.invalidate.invalidate(store, opts) assert not store.can_load(h)
def test_complex(): jugfile = os.path.join(_jugdir, 'tasklets.py') store, space = jug.jug.init(jugfile, 'dict_store') simple_execute() store, space = jug.jug.init(jugfile, store) opts = Options(default_options) opts.invalid_name = space['t'].name h = space['t'].hash() assert store.can_load(h) jug.subcommands.invalidate.invalidate(store, opts) assert not store.can_load(h)
def test_jug_invalidate(): def setAi(i): A[i] = True N = 1024 A = [False for i in range(N)] setall = [Task(setAi, i) for i in range(N)] store = dict_store() jug.task.Task.store = store for t in setall: t.run() opts = Options(default_options) opts.invalid_name = setall[0].name jug.jug.invalidate(store, opts) assert not list(store.store.keys()), list(store.store.keys()) jug.task.Task.store = dict_store()
def test_jug_invalidate(): def setAi(i): A[i] = True N = 1024 A = [False for i in range(N)] setall = [Task(setAi, i) for i in range(N)] store = dict_store() jug.task.Task.store = store for t in setall: t.run() opts = Options(default_options) opts.invalid_name = setall[0].name jug.subcommands.invalidate.invalidate(store, opts) assert not list(store.store.keys()), list(store.store.keys()) jug.task.Task.store = dict_store()