Run pytest with dedicated pytest.ini. (#59842)

Also disable the pytest cache plugin.
This commit is contained in:
Matt Clay 2019-07-31 00:28:39 -07:00 committed by GitHub
parent f944bd2358
commit 93931810c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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,
]

3
test/runner/pytest.ini Normal file
View file

@ -0,0 +1,3 @@
[pytest]
xfail_strict = true
mock_use_standalone_module = true

View file

@ -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