Coverage for /home/runner/work/zserio/zserio/compiler/extensions/python/runtime/tests/test_pubsub.py: 100%

15 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2024-12-05 10:43 +0000

1import unittest 

2 

3from zserio import PubsubInterface 

4 

5 

6class PubsubTest(unittest.TestCase): 

7 def test_publish(self): 

8 pubsub = PubsubInterface() 

9 with self.assertRaises(NotImplementedError): 

10 pubsub.publish("topic", bytes(), None) 

11 

12 def test_subscribe(self): 

13 pubsub = PubsubInterface() 

14 with self.assertRaises(NotImplementedError): 

15 pubsub.subscribe("topic", None, None) 

16 

17 def test_unsubscribe(self): 

18 pubsub = PubsubInterface() 

19 with self.assertRaises(NotImplementedError): 

20 pubsub.unsubscribe(0)