diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-07-10 14:25:55 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-07-10 14:48:24 +0200 |
commit | 75945e68cfeeebb69f29dbfc7013a9de970160d2 (patch) | |
tree | 49c6200c0b6fa0752ccc348639080ffde08f0ec0 /tests/unit/utils/test_log.py | |
parent | 6c9b088834d10fd6861551bf8ede5f896706a1ac (diff) | |
download | qutebrowser-75945e68cfeeebb69f29dbfc7013a9de970160d2.tar.gz qutebrowser-75945e68cfeeebb69f29dbfc7013a9de970160d2.zip |
tests: Init log args in TestQtMessageHandler
Diffstat (limited to 'tests/unit/utils/test_log.py')
-rw-r--r-- | tests/unit/utils/test_log.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/utils/test_log.py b/tests/unit/utils/test_log.py index f73b88b2c..3ae4c3cfc 100644 --- a/tests/unit/utils/test_log.py +++ b/tests/unit/utils/test_log.py @@ -407,6 +407,12 @@ class TestQtMessageHandler: file = attr.ib(default=None) line = attr.ib(default=None) + @pytest.fixture(autouse=True) + def init_args(self): + parser = qutebrowser.get_argparser() + args = parser.parse_args([]) + log.init_log(args) + def test_empty_message(self, caplog): """Make sure there's no crash with an empty message.""" log.qt_message_handler(QtCore.QtDebugMsg, self.Context(), "") |