From 4544c78395789a0d84d2250af6c4f29a03b7fe49 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 27 Aug 2015 06:25:10 +0200 Subject: [PATCH] Remove unneeded comments/monkeypatching. --- tests/unit/misc/test_cmdhistory.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/unit/misc/test_cmdhistory.py b/tests/unit/misc/test_cmdhistory.py index 096a26a82..d50b8419e 100644 --- a/tests/unit/misc/test_cmdhistory.py +++ b/tests/unit/misc/test_cmdhistory.py @@ -37,7 +37,6 @@ def hist(): def test_no_history(): hist = cmdhistory.History() - # .history should equal [] assert hist.history == [] @@ -144,13 +143,11 @@ def test_previtem_index_error(hist): assert str(excinfo.value) == "History end reached" -def test_append_private_mode(hist, monkeypatch, config_stub): +def test_append_private_mode(hist, config_stub): """Test append in private mode.""" hist.handle_private_mode = True # We want general.private-browsing set to True config_stub.data = CONFIG_PRIVATE - monkeypatch.setattr('qutebrowser.misc.cmdhistory.config', - config_stub) hist.append('new item') assert hist.history == HISTORY @@ -175,11 +172,9 @@ def test_append_empty_history(hist, config_stub): assert hist[0] == 'item' -def test_append_double(hist, monkeypatch, config_stub): +def test_append_double(hist, config_stub): # Disable private mode config_stub.data = CONFIG_NOT_PRIVATE - monkeypatch.setattr('qutebrowser.misc.cmdhistory.config', - config_stub) hist.append('fifth') # assert that the new 'fifth' is not added assert hist.history[-2:] == ['fourth', 'fifth']