| 87 | |
| 88 | # idempotent, but not deterministic |
| 89 | class A: |
| 90 | def __init__(self): |
| 91 | self.tok = random.random() |
| 92 | |
| 93 | def __reduce__(self): |
| 94 | return A, () |
| 95 | |
| 96 | def __dask_tokenize__(self): |
| 97 | return self.tok |
| 98 | |
| 99 | a = A() |
| 100 | with pytest.raises(AssertionError): |
no outgoing calls