tests/run.py: reformat with ruff

This commit is contained in:
Jörg Thalheim 2023-12-25 21:21:26 +01:00 committed by mergify[bot]
parent 3e3571c832
commit 453896efd8

View file

@ -40,7 +40,8 @@ def build_profile(
cmd = [ cmd = [
"nix", "nix",
"build", "build",
"--extra-experimental-features", "nix-command", "--extra-experimental-features",
"nix-command",
"-f", "-f",
"build-profile.nix", "build-profile.nix",
"-I", "-I",
@ -59,7 +60,11 @@ def build_profile(
if verbose: if verbose:
print(f"$ {' '.join(cmd)}") print(f"$ {' '.join(cmd)}")
res = subprocess.run( res = subprocess.run(
cmd, cwd=TEST_ROOT, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, cmd,
cwd=TEST_ROOT,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
) )
return (profile, res) return (profile, res)
@ -74,7 +79,9 @@ def parse_args() -> argparse.Namespace:
"If set to 1 it disable multi processing (suitable for debugging)", "If set to 1 it disable multi processing (suitable for debugging)",
) )
parser.add_argument( parser.add_argument(
"--verbose", action="store_true", help="Print evaluation commands executed", "--verbose",
action="store_true",
help="Print evaluation commands executed",
) )
parser.add_argument("profiles", nargs="*") parser.add_argument("profiles", nargs="*")
return parser.parse_args() return parser.parse_args()