MCPcopy
hub / github.com/fluentpython/example-code-2e / test_closure

Function test_closure

18-with-match/lispy/py3.9/examples_test.py:216–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

214(inc 99)
215"""
216def test_closure():
217 got = run(closure_src)
218 assert got == 100
219
220closure_with_change_src = """
221(define (make-counter)

Callers

nothing calls this directly

Calls 1

runFunction · 0.90

Tested by

no test coverage detected