From 8214c7448755b7171558fdc3213f45ee7654f21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Wed, 10 Aug 2022 07:54:27 +0800 Subject: [PATCH] Code quality issues with kivy upload --- tests-kivy.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests-kivy.py b/tests-kivy.py index a2d2130d..f4e21e8c 100644 --- a/tests-kivy.py +++ b/tests-kivy.py @@ -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())