From f4b8ec6e102cf5e7ab919399149dec747bbd9557 Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 12 Dec 2023 16:19:13 +0100 Subject: [PATCH] tests: pass --slow to cmdeploy test --- cmdeploy/src/cmdeploy/cmdeploy.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cmdeploy/src/cmdeploy/cmdeploy.py b/cmdeploy/src/cmdeploy/cmdeploy.py index 3fb8770c..b2686813 100644 --- a/cmdeploy/src/cmdeploy/cmdeploy.py +++ b/cmdeploy/src/cmdeploy/cmdeploy.py @@ -110,6 +110,15 @@ def status_cmd(args, out): print(line) +def test_cmd_options(parser): + parser.add_argument( + "--slow", + dest="slow", + action="store_true", + help="also run slow tests", + ) + + def test_cmd(args, out): """Run local and online tests for chatmail deployment. @@ -121,9 +130,10 @@ def test_cmd(args, out): out.check_call(f"{sys.executable} -m pip install deltachat") pytest_path = shutil.which("pytest") - ret = out.run_ret( - [pytest_path, "cmdeploy/src/", "-n4", "-rs", "-x", "-vrx", "--durations=5"] - ) + pytest_args = [pytest_path, "cmdeploy/src/", "-n4", "-rs", "-x", "-vrx", "--durations=5"] + if args.slow: + pytest_args.append("--slow") + ret = out.run_ret(pytest_args) return ret