()
| 36 | |
| 37 | |
| 38 | def test_eval_closure(): |
| 39 | global_, local = m.test_eval_closure() |
| 40 | |
| 41 | assert global_["closure_value"] == 42 |
| 42 | assert local["closure_value"] == 0 |
| 43 | |
| 44 | assert "local_value" not in global_ |
| 45 | assert local["local_value"] == 0 |
| 46 | |
| 47 | assert "func_global" not in global_ |
| 48 | assert local["func_global"]() == 42 |
| 49 | |
| 50 | assert "func_local" not in global_ |
| 51 | with pytest.raises(NameError): |
| 52 | local["func_local"]() |
nothing calls this directly
no outgoing calls
no test coverage detected