Hard to know what exactly is causing this without the log, but I suggest wrapping the start of your app in a script which kills it after a certain amount of time.
travis.yml, add in your
script: hook a file called
timeout.sh (or whatever you want it to be named):
Then create a
python3 -m tg_companion &
Alternatively, this would be possible, in which, say you have your module notice when it is being ran in test mode, and kill itself after a timeout - possibly a command-line flag, or looking at the environment for e.g.
Travis CI Staff