diff options
author | Matt Clay <matt@mystile.com> | 2019-07-31 09:28:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-31 09:28:39 +0200 |
commit | 93931810c8411bacdf5274d6e32d82c844d95b07 (patch) | |
tree | 4c1c54ebc435caab3c58572f858636a4ff6a436c | |
parent | Update ansible-test to properly skip unit tests. (diff) | |
download | ansible-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.py | 2 | ||||
-rw-r--r-- | test/runner/pytest.ini | 3 | ||||
-rw-r--r-- | tox.ini | 5 |
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 @@ -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 |