From 1a6408ffa9901ebd40c8e9013737d82ef8a34fe2 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 25 May 2021 13:25:28 -0400 Subject: [PATCH] tests: allow nox to pass through options (#693) Signed-off-by: Henry Schreiner --- noxfile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index 90f3ceaf..4d8493bb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -18,8 +18,11 @@ def tests(session): """ unit_test_args = ["--run-docker"] if sys.platform.startswith("linux") else [] session.install("-e", ".[test]") - session.run("pytest", "unit_test", *unit_test_args) - session.run("pytest", "test", "-x", "--durations", "0", "--timeout=2400", "test") + if session.posargs: + session.run("pytest", *session.posargs) + else: + session.run("pytest", "unit_test", *unit_test_args) + session.run("pytest", "test", "-x", "--durations", "0", "--timeout=2400", "test") @nox.session