Merge "Add type hints to fail function"

This commit is contained in:
Zuul 2021-06-16 13:26:25 +00:00 committed by Gerrit Code Review
commit 9f0c190542
1 changed files with 3 additions and 1 deletions

View File

@ -13,13 +13,15 @@
# under the License.
from __future__ import absolute_import
import typing
import testtools
FailureException = testtools.TestCase.failureException
def fail(msg, *args, **kwargs):
def fail(msg: str, *args, **kwargs) -> typing.NoReturn:
"""Fail immediately current test case execution, with the given message.
Unconditionally raises a tobiko.FailureException as in below equivalent