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

Function test_closure

18-with-match/lispy/py3.10/examples_test.py:217–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

runFunction · 0.90

Tested by

no test coverage detected