Skip to content

Instantly share code, notes, and snippets.

@hpk42
Created September 10, 2013 11:18
Show Gist options
  • Save hpk42/6507999 to your computer and use it in GitHub Desktop.
Save hpk42/6507999 to your computer and use it in GitHub Desktop.
+ def test_is_greenlet_local(self, D):
+ greenlet = pytest.importorskip("greenlet")
+ d = wrap_dict(dict)()
+ d['x'] = 42
+
+ def run():
+ assert 'x' not in d._dict
+ d['x'] = 23
+
+ greenlet.greenlet(run).switch()
+ assert 42 == d._dict["x"]
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment