Exemplo n.º 1
0
 def test_changing_var_in_outer_env(self):
     env = Environment(outer=Environment({"my-var": 1}))
     env.defining_env("my-var")["my-var"] = 2
     assert_equals(2, env["my-var"])
Exemplo n.º 2
0
 def test_finding_defining_env(self):
     outer = Environment({"my-var": 1})
     inner = Environment(outer=outer)
     assert_equals(outer, inner.defining_env("my-var"))