We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4facf70 commit 6a70ba0Copy full SHA for 6a70ba0
test/test_sync.py
@@ -74,6 +74,16 @@ def periodicity():
74
if msg is not None:
75
self.assertIsNone(self.net.bus.recv(TIMEOUT))
76
77
+ def test_sync_producer_restart(self):
78
+ self.sync.start(PERIOD)
79
+ self.addCleanup(self.sync.stop)
80
+ # Cannot start again while running
81
+ with self.assertRaises(RuntimeError):
82
83
+ # Can restart after stopping
84
+ self.sync.stop()
85
86
+
87
88
if __name__ == "__main__":
89
unittest.main()
0 commit comments