write tests for streamer

This commit is contained in:
bkfox
2023-06-12 14:09:06 +02:00
parent b586bc5309
commit 3d76b656d2
11 changed files with 254 additions and 41 deletions

View File

@ -173,7 +173,7 @@ class Streamer:
self.check_zombie_process()
self.process = subprocess.Popen(args, stderr=subprocess.STDOUT)
atexit.register(lambda: self.kill_process())
atexit.register(self.kill_process)
def kill_process(self):
if self.process:
@ -184,6 +184,7 @@ class Streamer:
)
self.process.kill()
self.process = None
atexit.unregister(self.kill_process)
def wait_process(self):
"""Wait for the process to terminate if there is a process."""