def test_get_screens_2(cl_mock): cl_mock.return_value = XRANDR_2 screens = autodetect.get_screens() eq_([ autodetect.Screen(name='LVDS1', width=1366), autodetect.Screen(name='DP2', width=2560) ], screens)
def test_systray_2(cl_mock): autodetect.systray([ autodetect.Screen(name='LVDS1', width=1366), autodetect.Screen(name='DP2', width=2560) ]) eq_( "call('trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 11 --tint 0x000000 --alpha 0 --transparent true --height 17 --margin 0 &')", str(cl_mock.call_args))
def test_xrandr_2(cl_mock): autodetect.xrandr([ autodetect.Screen(name='LVDS1', width=1366), autodetect.Screen(name='DP2', width=2560) ], False) eq_( "call('xrandr --output LVDS1 --off --output DP2 --left-of LVDS1 --auto')", str(cl_mock.call_args))
def test_xrandr_3(cl_mock): autodetect.xrandr([ autodetect.Screen(name='LVDS1', width=1366), autodetect.Screen(name='VGA1', width=1920), autodetect.Screen(name='DP2', width=2560) ], False) eq_( "call('xrandr --output LVDS1 --off --output VGA1 --rotation left --auto --output DP2 --left-of VGA1 --auto --rotation normal')", str(cl_mock.call_args))
def test_xrandr_1(cl_mock): autodetect.xrandr([autodetect.Screen(name='LVDS1', width=1366)], True) eq_("call('xrandr --output LVDS1 --auto')", str(cl_mock.call_args))