diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-04-10 18:22:58 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-04-10 18:23:10 +0200 |
commit | 8aaae5b78c0b6f829f45524c16d0b224886672a5 (patch) | |
tree | c4d847303e21d67f54620074ce5b869152862a47 | |
parent | ced87b163fbd59d9672f3d415e22dd54d1d38c03 (diff) | |
download | qutebrowser-8aaae5b78c0b6f829f45524c16d0b224886672a5.tar.gz qutebrowser-8aaae5b78c0b6f829f45524c16d0b224886672a5.zip |
Fix test_last_window_session_none
-rw-r--r-- | tests/unit/misc/test_sessions_unit.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/misc/test_sessions_unit.py b/tests/unit/misc/test_sessions_unit.py index 8517e0db9..580b95831 100644 --- a/tests/unit/misc/test_sessions_unit.py +++ b/tests/unit/misc/test_sessions_unit.py @@ -447,10 +447,14 @@ class TestSave: sess_man.save(str(session_path)) assert 'session' not in state_config['general'] - def test_last_window_session_none(self, sess_man, tmpdir): + def test_last_window_session_none(self, caplog, sess_man, tmpdir): session_path = tmpdir / 'foo.yml' - with pytest.raises(AssertionError): + with caplog.at_level(logging.ERROR): sess_man.save(str(session_path), last_window=True) + + assert len(caplog.records) == 1 + msg = "last_window_session is None while saving!" + assert caplog.records[0].msg == msg assert not session_path.exists() def test_last_window_session(self, sess_man, tmpdir): |