diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index af836658b..5330d81cb 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -1,3 +1,4 @@ +# encoding: utf-8 """ terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 35981b568..da5d9ca44 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1599,10 +1599,10 @@ def test_line_with_reprcrash(monkeypatch): monkeypatch.setattr(_pytest.terminal, "_get_pos", mock_get_pos) - class config: + class config(object): pass - class rep: + class rep(object): def _get_verbose_word(self, *args): return mocked_verbose_word @@ -1614,7 +1614,7 @@ def test_line_with_reprcrash(monkeypatch): __tracebackhide__ = True if msg: rep.longrepr.reprcrash.message = msg - actual = _get_line_with_reprcrash_message(config, rep, width) + actual = _get_line_with_reprcrash_message(config, rep(), width) assert actual == expected if actual != "%s %s" % (mocked_verbose_word, mocked_pos):