Skip to content

Commit 41387dc

Browse files
committed
Fix syntax errors
1 parent 3ce4a4c commit 41387dc

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
# - name: Test remote
5454
# run: |
5555
# pytest test/test_remote.py -v
56-
# - name: Test streamer
57-
# run: |
58-
# pytest test/test_streamer.py -v
59-
- name: Test subscription
56+
- name: Test streamer
6057
run: |
61-
pytest test/test_subscription.py -v
58+
pytest test/test_streamer.py -v
59+
# - name: Test subscription
60+
# run: |
61+
# pytest test/test_subscription.py -v

test/test_streamer.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
"""
1111

12+
import pytest
1213
import unittest
1314
import asyncio
1415
import os
@@ -26,10 +27,14 @@ class TestStreamer(unittest.IsolatedAsyncioTestCase):
2627
to ensure that messages are correctly streamed and received.
2728
"""
2829

29-
#
30-
def tearDown(self):
31-
terminate_connections.main()
30+
nodes = []
3231

32+
async def asyncTearDown(self):
33+
for node in self.nodes:
34+
print(f"Closing node {node.port}")
35+
await node.stop()
36+
37+
@pytest.mark.asyncio
3338
async def test_stream(self) -> None:
3439
"""
3540
Test the streaming functionality between a producer and a consumer.
@@ -62,6 +67,7 @@ async def test_stream(self) -> None:
6267

6368
await run_transmission(producer, consumer, parent=self)
6469

70+
@pytest.mark.asyncio
6571
async def test_file_transfer(self) -> None:
6672
"""
6773
Test the file transfer functionality between a producer and a consumer.
@@ -153,6 +159,7 @@ def new_file_event(**kwargs):
153159
await consumer.stop()
154160
await producer.stop()
155161

162+
@pytest.mark.asyncio
156163
async def test_file_dissable_transfer(self) -> None:
157164
"""
158165
Test the file transfer functionality when the consumer has file transfer disabled.
@@ -213,6 +220,7 @@ async def test_file_dissable_transfer(self) -> None:
213220
await consumer.stop()
214221
await producer.stop()
215222

223+
@pytest.mark.asyncio
216224
async def test_stream_chain(self) -> None:
217225
"""
218226
Test chaining of multiple ChaskiStreamer instances end-to-end.
@@ -312,6 +320,7 @@ async def test_stream_chain(self) -> None:
312320
await chain4.stop()
313321
await chain5.stop()
314322

323+
@pytest.mark.asyncio
315324
async def test_root_node(self) -> None:
316325
"""
317326
Test chaining of multiple ChaskiStreamer instances end-to-end.

0 commit comments

Comments
 (0)