()
| 297 | |
| 298 | |
| 299 | def test_inline_functions_non_hashable(): |
| 300 | class NonHashableCallable: |
| 301 | def __call__(self, a): |
| 302 | return a + 1 |
| 303 | |
| 304 | def __hash__(self): |
| 305 | raise TypeError("Not hashable") |
| 306 | |
| 307 | nohash = NonHashableCallable() |
| 308 | |
| 309 | dsk = {"a": 1, "b": (inc, "a"), "c": (nohash, "b"), "d": (inc, "c")} |
| 310 | |
| 311 | result = inline_functions(dsk, [], fast_functions={inc}) |
| 312 | assert result["c"] == (nohash, dsk["b"]) |
| 313 | assert "b" not in result |
| 314 | |
| 315 | |
| 316 | def test_inline_doesnt_shrink_fast_functions_at_top(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…