diff options
author | Florian Bruhin <me@the-compiler.org> | 2019-12-20 13:50:54 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2019-12-20 16:54:08 +0100 |
commit | 20ee9e2d09b8a3d275080000b11fd5566afd525c (patch) | |
tree | f4b81d8ae09e07de0d2249ab6c87a21f6916bb1f /tests/unit/config/test_configcommands.py | |
parent | b20eba35e91735ca954af72f5d5ae7d407b7bbf2 (diff) | |
download | qutebrowser-20ee9e2d09b8a3d275080000b11fd5566afd525c.tar.gz qutebrowser-20ee9e2d09b8a3d275080000b11fd5566afd525c.zip |
Replace configutils.UNSET by usertypes.UNSET
No need for two different UNSET types. Also, this avoids a circular import:
configutils -> urlutils -> config -> configdata -> configtypes -> configutils
Diffstat (limited to 'tests/unit/config/test_configcommands.py')
-rw-r--r-- | tests/unit/config/test_configcommands.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/config/test_configcommands.py b/tests/unit/config/test_configcommands.py index 382d41ad8..97dcd7c42 100644 --- a/tests/unit/config/test_configcommands.py +++ b/tests/unit/config/test_configcommands.py @@ -25,7 +25,7 @@ import unittest.mock import pytest from PyQt5.QtCore import QUrl -from qutebrowser.config import configcommands, configutils +from qutebrowser.config import configcommands from qutebrowser.api import cmdutils from qutebrowser.utils import usertypes, urlmatch from qutebrowser.keyinput import keyutils @@ -92,7 +92,7 @@ class TestSet: commands.set(0, option, inp, temp=temp) assert config_stub.get(option) == new_value - assert yaml_value(option) == (configutils.UNSET if temp else new_value) + assert yaml_value(option) == (usertypes.UNSET if temp else new_value) def test_set_with_pattern(self, monkeypatch, commands, config_stub): monkeypatch.setattr(objects, 'backend', usertypes.Backend.QtWebKit) @@ -295,7 +295,7 @@ class TestAdd: assert str(config_stub.get(name)[-1]) == value if temp: - assert yaml_value(name) == configutils.UNSET + assert yaml_value(name) == usertypes.UNSET else: assert yaml_value(name)[-1] == value @@ -328,7 +328,7 @@ class TestAdd: assert str(config_stub.get(name)[key]) == value if temp: - assert yaml_value(name) == configutils.UNSET + assert yaml_value(name) == usertypes.UNSET else: assert yaml_value(name)[key] == value @@ -379,7 +379,7 @@ class TestRemove: assert value not in config_stub.get(name) if temp: - assert yaml_value(name) == configutils.UNSET + assert yaml_value(name) == usertypes.UNSET else: assert value not in yaml_value(name) @@ -410,7 +410,7 @@ class TestRemove: assert key not in config_stub.get(name) if temp: - assert yaml_value(name) == configutils.UNSET + assert yaml_value(name) == usertypes.UNSET else: assert key not in yaml_value(name) @@ -446,7 +446,7 @@ class TestUnsetAndClear: commands.config_unset(name, temp=temp) assert config_stub.get(name) == 'always' - assert yaml_value(name) == ('never' if temp else configutils.UNSET) + assert yaml_value(name) == ('never' if temp else usertypes.UNSET) def test_unset_unknown_option(self, commands): with pytest.raises(cmdutils.CommandError, match="No option 'tabs'"): @@ -460,7 +460,7 @@ class TestUnsetAndClear: commands.config_clear(save=save) assert config_stub.get(name) == 'always' - assert yaml_value(name) == (configutils.UNSET if save else 'never') + assert yaml_value(name) == (usertypes.UNSET if save else 'never') class TestSource: |