Skip to content

Commit

Permalink
fixed test_pickle_safe
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Apr 16, 2021
1 parent 084680c commit 6548968
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions distributed/tests/test_publish.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
from types import SimpleNamespace

import pytest

Expand Down Expand Up @@ -271,12 +272,11 @@ async def test_pickle_safe(c, s, a, b):
assert result == [1, 2, 3]

with pytest.raises(TypeError):
await c2.publish_dataset(y=lambda x: x)
# SimpleNamespace() is not serializable
await c2.publish_dataset(y=SimpleNamespace())

await c.publish_dataset(z=lambda x: x) # this can use pickle

with pytest.raises(TypeError):
await c2.get_dataset("z")
await c2.get_dataset("z")


@gen_cluster(client=True)
Expand Down

0 comments on commit 6548968

Please sign in to comment.