forked from openshift/openshift-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure pytest to run tests and coverage
- Loading branch information
1 parent
95f11aa
commit fbc8d14
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
[run] | ||
omit= | ||
branch = True | ||
omit = | ||
*/lib/python*/site-packages/* | ||
*/lib/python*/* | ||
/usr/* | ||
setup.py | ||
# TODO(rhcarvalho): this is used to ignore test files from coverage report. | ||
# We can make this less generic when we stick with a single test pattern in | ||
# the repo. | ||
test_*.py | ||
*_tests.py | ||
|
||
[report] | ||
fail_under = 25 | ||
|
||
[html] | ||
directory = cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""pytest configuration""" | ||
|
||
|
||
def pytest_ignore_collect(path): | ||
"""Hook to ignore symlink files and directories.""" | ||
return path.islink() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ nose | |
coverage | ||
mock | ||
pytest | ||
pytest-cov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters