Skip to content

Commit

Permalink
assert type
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Dec 16, 2024
1 parent 401e4eb commit a9a2157
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_add_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ def test_append_connection():
a = CreateList(size=5)
b = CreateList(size=4)

assert isinstance(a.outs, znflow.Connection)

with pytest.raises(TypeError):
a.outs.append(b.outs)

Expand All @@ -488,6 +490,8 @@ def test_append_function_future():
a = create_list(5)
b = create_list(5)

assert isinstance(a, znflow.FunctionFuture)

with pytest.raises(TypeError):
a.append(b)

Expand All @@ -506,6 +510,8 @@ def test_append_combined_connection():
a = create_list(5)
b = create_list(5)

assert isinstance(a + b, znflow.CombinedConnections)

with pytest.raises(TypeError):
a.append(a + b)

Expand Down

0 comments on commit a9a2157

Please sign in to comment.