Code quality issues with kivy upload
This commit is contained in:
parent
e5e9955cd9
commit
8214c74487
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
"""Custom tests runner script for tox and python3"""
|
||||
import os
|
||||
import random # noseq
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from os import environ, mkdir
|
||||
from subprocess import Popen, TimeoutExpired
|
||||
from time import sleep
|
||||
|
||||
|
||||
|
@ -22,22 +22,22 @@ if __name__ == "__main__":
|
|||
|
||||
if in_docker:
|
||||
try:
|
||||
mkdir("../out")
|
||||
except FileExistsError: # flake8: noqa:F821
|
||||
os.mkdir("../out")
|
||||
except FileExistsError: # noqa:F821
|
||||
pass
|
||||
|
||||
ffmpeg = Popen([ # pylint: disable=consider-using-with
|
||||
"ffmpeg", "-y", "-nostdin", "-f", "x11grab", "-video_size", "vga",
|
||||
"-draw_mouse", "0", "-i", environ['DISPLAY'],
|
||||
"-codec:v", "libvpx-vp9", "-lossless", "1", "-r", "30",
|
||||
"../out/test.webm"
|
||||
])
|
||||
ffmpeg = subprocess.Popen([ # pylint: disable=consider-using-with
|
||||
"ffmpeg", "-y", "-nostdin", "-f", "x11grab", "-video_size", "vga",
|
||||
"-draw_mouse", "0", "-i", os.environ['DISPLAY'],
|
||||
"-codec:v", "libvpx-vp9", "-lossless", "1", "-r", "60",
|
||||
"../out/test.webm"
|
||||
])
|
||||
sleep(2) # let ffmpeg start
|
||||
result = unittest.TextTestRunner(verbosity=2).run(unittest_discover())
|
||||
if in_docker:
|
||||
ffmpeg.terminate()
|
||||
try:
|
||||
ffmpeg.wait(10)
|
||||
except TimeoutExpired:
|
||||
except subprocess.TimeoutExpired:
|
||||
ffmpeg.kill()
|
||||
sys.exit(not result.wasSuccessful())
|
||||
|
|
Reference in New Issue
Block a user