[xrandr-tests] Test disconnecting excluded active display
This commit is contained in:
parent
06afb03807
commit
13a851a636
1 changed files with 15 additions and 0 deletions
|
@ -148,6 +148,21 @@ def test_autotoggle_excluded_inactive_connected(mocker):
|
||||||
xrandr_cli.assert_called_once_with("xrandr -q")
|
xrandr_cli.assert_called_once_with("xrandr -q")
|
||||||
|
|
||||||
|
|
||||||
|
def test_autotoggle_excluded_active_disconnected(mocker):
|
||||||
|
xrandr_cli = mock_xrandr(mocker, HDMI_CONNECTED_ACTIVE)
|
||||||
|
module = Module(Config(["-p", "xrandr.autotoggle=true", "xrandr.exclude=HDMI"]), theme=None)
|
||||||
|
module.update()
|
||||||
|
xrandr_cli.assert_called_once_with("xrandr -q")
|
||||||
|
|
||||||
|
assert_widgets(module, ("eDP-1-1", "on", 0))
|
||||||
|
|
||||||
|
xrandr_cli.return_value = HDMI_DISCONNECTED_ACTIVE
|
||||||
|
xrandr_cli.reset_mock()
|
||||||
|
|
||||||
|
module.update()
|
||||||
|
xrandr_cli.assert_called_once_with("xrandr -q")
|
||||||
|
|
||||||
|
|
||||||
def test_autotoggle_active_disconnected(mocker):
|
def test_autotoggle_active_disconnected(mocker):
|
||||||
xrandr_cli = mock_xrandr(mocker, HDMI_CONNECTED_ACTIVE)
|
xrandr_cli = mock_xrandr(mocker, HDMI_CONNECTED_ACTIVE)
|
||||||
module = Module(Config(["-p", "xrandr.autotoggle=true"]), theme=None)
|
module = Module(Config(["-p", "xrandr.autotoggle=true"]), theme=None)
|
||||||
|
|
Loading…
Reference in a new issue