diff options
| author | arcadia-devtools <[email protected]> | 2022-02-14 00:49:36 +0300 |
|---|---|---|
| committer | arcadia-devtools <[email protected]> | 2022-02-14 00:49:36 +0300 |
| commit | 82cfd1b7cab2d843cdf5467d9737f72597a493bd (patch) | |
| tree | 1dfdcfe81a1a6b193ceacc2a828c521b657a339b /contrib/python/pytest/py3/_pytest/pytester_assertions.py | |
| parent | 3df7211d3e3691f8e33b0a1fb1764fe810d59302 (diff) | |
intermediate changes
ref:68b1302de4b5da30b6bdf02193f7a2604d8b5cf8
Diffstat (limited to 'contrib/python/pytest/py3/_pytest/pytester_assertions.py')
| -rw-r--r-- | contrib/python/pytest/py3/_pytest/pytester_assertions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/python/pytest/py3/_pytest/pytester_assertions.py b/contrib/python/pytest/py3/_pytest/pytester_assertions.py index 630c1d3331c..657e4db5fc3 100644 --- a/contrib/python/pytest/py3/_pytest/pytester_assertions.py +++ b/contrib/python/pytest/py3/_pytest/pytester_assertions.py @@ -4,6 +4,7 @@ # hence cannot be subject to assertion rewriting, which requires a # module to not be already imported. from typing import Dict +from typing import Optional from typing import Sequence from typing import Tuple from typing import Union @@ -42,6 +43,8 @@ def assert_outcomes( errors: int = 0, xpassed: int = 0, xfailed: int = 0, + warnings: Optional[int] = None, + deselected: Optional[int] = None, ) -> None: """Assert that the specified outcomes appear with the respective numbers (0 means it didn't occur) in the text output from a test run.""" @@ -63,4 +66,10 @@ def assert_outcomes( "xpassed": xpassed, "xfailed": xfailed, } + if warnings is not None: + obtained["warnings"] = outcomes.get("warnings", 0) + expected["warnings"] = warnings + if deselected is not None: + obtained["deselected"] = outcomes.get("deselected", 0) + expected["deselected"] = deselected assert obtained == expected |
