run-unit-tests: apply "ruff format"

This commit is contained in:
Yu Watanabe
2026-05-18 02:44:46 +09:00
parent 2c73e5b973
commit d89d23bc8f
+23 -6
View File
@@ -6,8 +6,10 @@ import os
import pathlib
import subprocess
import sys
try:
import colorama as c
GREEN = c.Fore.GREEN
YELLOW = c.Fore.YELLOW
RED = c.Fore.RED
@@ -16,23 +18,38 @@ try:
except ImportError:
GREEN = YELLOW = RED = RESET_ALL = BRIGHT = ''
class total:
total = None
good = 0
skip = 0
fail = 0
def argument_parser():
p = argparse.ArgumentParser()
p.add_argument('-u', '--unsafe', action='store_true',
help='run "unsafe" tests too')
p.add_argument('-A', '--artifact_directory',
help='store output from failed tests in this dir')
p.add_argument('-s', '--skip', action='append', default=[],
help='skip the named test')
p.add_argument(
'-u',
'--unsafe',
action='store_true',
help='run "unsafe" tests too',
)
p.add_argument(
'-A',
'--artifact_directory',
help='store output from failed tests in this dir',
)
p.add_argument(
'-s',
'--skip',
action='append',
default=[],
help='skip the named test',
)
return p
opts = argument_parser().parse_args()
unittestdir = pathlib.Path(__file__).parent.absolute() / 'unit-tests'