summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-07-31 09:28:39 +0200
committerGitHub <noreply@github.com>2019-07-31 09:28:39 +0200
commit93931810c8411bacdf5274d6e32d82c844d95b07 (patch)
tree4c1c54ebc435caab3c58572f858636a4ff6a436c
parentUpdate ansible-test to properly skip unit tests. (diff)
downloadansible-93931810c8411bacdf5274d6e32d82c844d95b07.tar.xz
ansible-93931810c8411bacdf5274d6e32d82c844d95b07.zip
Run pytest with dedicated pytest.ini. (#59842)
Also disable the pytest cache plugin.
-rw-r--r--test/runner/lib/executor.py2
-rw-r--r--test/runner/pytest.ini3
-rw-r--r--tox.ini5
3 files changed, 5 insertions, 5 deletions
diff --git a/test/runner/lib/executor.py b/test/runner/lib/executor.py
index aad1a97131..2331a8826d 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 0000000000..6426f2d4d7
--- /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 8a5c8ddb3b..83360faf5c 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