From 2b727914e8cbee6810b1bb9a1cfdb90ad521ceb6 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Thu, 2 Jul 2020 13:51:28 -0400 Subject: tests: use markers to configure disable_subp_usage (#473) This is an improvement over indirect parameterisation for a few reasons: * The test code is much easier to read, the mark names are much more intuitive than the indirect parameterisation invocation, and there's less boilerplate to boot * The fixture no longer has to overload the single parameter that fixtures can take with multiple meanings --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index 847a2fbd..5257f9e3 100644 --- a/tox.ini +++ b/tox.ini @@ -133,3 +133,10 @@ commands = {envpython} -m tests.cloud_tests {posargs} passenv = HOME TRAVIS deps = -r{toxinidir}/integration-requirements.txt + +[pytest] +# TODO: s/--strict/--strict-markers/ once xenial support is dropped +addopts = --strict +markers = + allow_subp_for: allow subp usage for the given commands (disable_subp_usage) + allow_all_subp: allow all subp usage (disable_subp_usage) -- cgit v1.2.3