-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from uclahs-cds/nwiltsie-encapsulate-testasser…
…t-again Encapsulate NFTestAssert class, rewrite tests (attempt 2)
- Loading branch information
Showing
11 changed files
with
262 additions
and
156 deletions.
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
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
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
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
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ requires = [ | |
"wheel" | ||
] | ||
|
||
build-backend = "setuptools.build_meta" | ||
build-backend = "setuptools.build_meta" |
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,21 @@ | ||
"Local plugin to intelligently combine xfail marks." | ||
|
||
import pytest | ||
|
||
|
||
def pytest_configure(config): | ||
"Hook to add in the custom marker." | ||
config.addinivalue_line( | ||
"markers", | ||
"xfailgroup(ExceptionClass): Mark that the test is expected to fail with " | ||
"the given exception type. If xfailgroup is applied multiple times, the " | ||
"test will pass if it raises any of the exception types.", | ||
) | ||
|
||
|
||
@pytest.hookimpl(trylast=True) | ||
def pytest_runtest_setup(item): | ||
"Merge all of the xfailgroup markers into a single xfail marker." | ||
failure_types = {mark.args[0] for mark in item.iter_markers(name="xfailgroup")} | ||
if failure_types: | ||
item.add_marker(pytest.mark.xfail(raises=tuple(failure_types))) |
Oops, something went wrong.