modified config stub in test_line_with_reprcrash to use verbose=0
This commit is contained in:
parent
14bf4974b5
commit
0407acbb17
|
@ -2377,8 +2377,13 @@ def test_line_with_reprcrash(monkeypatch: MonkeyPatch) -> None:
|
||||||
|
|
||||||
monkeypatch.setattr(_pytest.terminal, "_get_node_id_with_markup", mock_get_pos)
|
monkeypatch.setattr(_pytest.terminal, "_get_node_id_with_markup", mock_get_pos)
|
||||||
|
|
||||||
|
class Namespace:
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.__dict__.update(kwargs)
|
||||||
|
|
||||||
class config:
|
class config:
|
||||||
pass
|
def __init__(self):
|
||||||
|
object.__setattr__(self, "option", Namespace(verbose=0))
|
||||||
|
|
||||||
class rep:
|
class rep:
|
||||||
def _get_verbose_word(self, *args):
|
def _get_verbose_word(self, *args):
|
||||||
|
@ -2399,7 +2404,7 @@ def test_line_with_reprcrash(monkeypatch: MonkeyPatch) -> None:
|
||||||
if msg:
|
if msg:
|
||||||
rep.longrepr.reprcrash.message = msg # type: ignore
|
rep.longrepr.reprcrash.message = msg # type: ignore
|
||||||
actual = _get_line_with_reprcrash_message(
|
actual = _get_line_with_reprcrash_message(
|
||||||
config, # type: ignore[arg-type]
|
config(), # type: ignore[arg-type]
|
||||||
rep(), # type: ignore[arg-type]
|
rep(), # type: ignore[arg-type]
|
||||||
DummyTerminalWriter(), # type: ignore[arg-type]
|
DummyTerminalWriter(), # type: ignore[arg-type]
|
||||||
{},
|
{},
|
||||||
|
|
Loading…
Reference in New Issue