Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/d/i/diy-lisp-HEAD/tests/test_4_working_with_variables_and_environments.py   diy-lisp(Download)
def test_set_changes_environment_in_place():
    """When calling `set` the environment should be updated"""
 
    env = Environment()
    env.set("foo", 2)
    env = Environment({"foo": 1})
    with assert_raises_regexp(LispError, "already defined"):
        env.set("foo", 2)