Allow bytes for OutcomeException(msg=...)
It's __repr__ explicitly handles it so allow it.
This commit is contained in:
parent
8d413c1926
commit
65aee1e0c8
|
@ -5,6 +5,7 @@ as well as functions creating them
|
||||||
import sys
|
import sys
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from packaging.version import Version
|
from packaging.version import Version
|
||||||
|
|
||||||
|
@ -17,7 +18,9 @@ class OutcomeException(BaseException):
|
||||||
contain info about test and collection outcomes.
|
contain info about test and collection outcomes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, msg: Optional[str] = None, pytrace: bool = True) -> None:
|
def __init__(
|
||||||
|
self, msg: Optional[Union[str, bytes]] = None, pytrace: bool = True
|
||||||
|
) -> None:
|
||||||
BaseException.__init__(self, msg)
|
BaseException.__init__(self, msg)
|
||||||
self.msg = msg
|
self.msg = msg
|
||||||
self.pytrace = pytrace
|
self.pytrace = pytrace
|
||||||
|
|
Loading…
Reference in New Issue