mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Teach PyTest where NOT to look for tests
This commit is contained in:
parent
2e62722887
commit
528cbb83eb
1 changed files with 10 additions and 0 deletions
|
@ -175,7 +175,17 @@ def pytest_configure(config):
|
|||
called after command line options have been parsed
|
||||
and all plugins and initial conftest files been loaded.
|
||||
'''
|
||||
for dirname in os.listdir(CODE_DIR):
|
||||
if not os.path.isdir(dirname):
|
||||
continue
|
||||
if dirname != 'tests':
|
||||
config.addinivalue_line('norecursedirs', os.path.join(CODE_DIR, dirname))
|
||||
|
||||
config.addinivalue_line('norecursedirs', os.path.join(CODE_DIR, 'templates'))
|
||||
config.addinivalue_line('norecursedirs', os.path.join(CODE_DIR, 'tests/kitchen'))
|
||||
config.addinivalue_line('norecursedirs', os.path.join(CODE_DIR, 'tests/support'))
|
||||
|
||||
# Expose the markers we use to pytest CLI
|
||||
config.addinivalue_line(
|
||||
'markers',
|
||||
'destructive_test: Run destructive tests. These tests can include adding '
|
||||
|
|
Loading…
Add table
Reference in a new issue