-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PYMON #2 - Correctly handles pytest outcomes situation (importorskip,…
… fail & skip).
- Loading branch information
Jean-Sebastien Dieu
committed
Mar 16, 2020
1 parent
fb7bc20
commit 2a9a0e4
Showing
3 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
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,15 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.skip(reason='Some special test to skip') | ||
def test_that(): | ||
assert True | ||
|
||
|
||
def test_that_one_is_skipped_too(): | ||
pytest.skip('Test executed and instructed to be skipped from its body') | ||
|
||
|
||
def test_import_or_skip(): | ||
pytest.importorskip('this_module_does_not_exists') | ||
|
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