Skip to content

Commit

Permalink
Merge branch 'main' into andrew/revise_stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
ayjayt committed Dec 28, 2024
2 parents ff36c72 + e2b53bf commit 1ec5f72
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dev = [
"pytest-xdist",
"async-timeout",
"poethepoet>=0.31.1",
"numpy"
]

[project.scripts]
Expand Down
7 changes: 7 additions & 0 deletions tests/test_serializer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from datetime import datetime

import numpy as np

from choreographer.pipe import Pipe

data = [1, 2.00, 3, float("nan"), float("inf"), float("-inf"), datetime(1970, 1, 1)]
Expand All @@ -13,6 +15,11 @@ def test_de_serialize():
obj = pipe.deserialize(message[:-1]) # split out \0
for o, t in zip(obj, converted_type):
assert isinstance(o, t)
message_np = pipe.serialize(np.array(data))
assert message_np == expected_message
obj_np = pipe.deserialize(message_np[:-1]) # split out \0
for o, t in zip(obj_np, converted_type):
assert isinstance(o, t)


# TODO: Not sure if this all the data we have to worry about:
Expand Down
Loading

0 comments on commit 1ec5f72

Please sign in to comment.