From 93931810c8411bacdf5274d6e32d82c844d95b07 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 31 Jul 2019 00:28:39 -0700 Subject: [PATCH] Run pytest with dedicated pytest.ini. (#59842) Also disable the pytest cache plugin. --- test/runner/lib/executor.py | 2 ++ test/runner/pytest.ini | 3 +++ tox.ini | 5 ----- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 test/runner/pytest.ini diff --git a/test/runner/lib/executor.py b/test/runner/lib/executor.py index aad1a971318..2331a8826dd 100644 --- a/test/runner/lib/executor.py +++ b/test/runner/lib/executor.py @@ -1368,6 +1368,8 @@ def command_units(args): '-n', str(args.num_workers) if args.num_workers else 'auto', '--color', 'yes' if args.color else 'no', + '-p', 'no:cacheprovider', + '-c', os.path.join(ANSIBLE_ROOT, 'test/runner/pytest.ini'), '--junit-xml', 'test/results/junit/python%s-units.xml' % version, ] diff --git a/test/runner/pytest.ini b/test/runner/pytest.ini new file mode 100644 index 00000000000..6426f2d4d7e --- /dev/null +++ b/test/runner/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +xfail_strict = true +mock_use_standalone_module = true diff --git a/tox.ini b/tox.ini index 8a5c8ddb3b0..83360faf5c9 100644 --- a/tox.ini +++ b/tox.ini @@ -19,11 +19,6 @@ passenv = # variable error. See issue: #20424 HOME -[pytest] -xfail_strict = true -cache_dir = .pytest_cache -mock_use_standalone_module = true - [flake8] # These are things that the devs don't agree make the code more readable # E402 module level import not at top of file