()
| 241 | |
| 242 | |
| 243 | def test_partial(): |
| 244 | add2 = scope.partial("add", 2) |
| 245 | print(add2) |
| 246 | assert len(str(add2).split("\n")) == 3 |
| 247 | |
| 248 | # add2 evaluates to a scope method |
| 249 | thing = rec_eval(add2) |
| 250 | print(thing) |
| 251 | assert "SymbolTableEntry" in str(thing) |
| 252 | |
| 253 | # add2() evaluates to a failure because it's only a partial application |
| 254 | assert_raises(NotImplementedError, rec_eval, add2()) |
| 255 | |
| 256 | # add2(3) evaluates to 5 because we've filled in all the blanks |
| 257 | thing = rec_eval(add2(3)) |
| 258 | print(thing) |
| 259 | assert thing == 5 |
| 260 | |
| 261 | |
| 262 | def test_callpipe(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…