Back to index

unity  6.0.0
Namespaces | Classes | Functions
unity.tests.launcher Namespace Reference

Namespaces

namespace  test_capture
namespace  test_icon_behavior
namespace  test_keynav
namespace  test_reveal
namespace  test_shortcut
namespace  test_switcher
namespace  test_visual

Classes

class  LauncherTestCase

Functions

def _make_scenarios

Function Documentation

Make scenarios for launcher test cases based on the number of configured
monitors.

Definition at line 17 of file __init__.py.

00017 
00018 def _make_scenarios():
00019     """Make scenarios for launcher test cases based on the number of configured
00020     monitors.
00021     """
00022     screen_geometry = ScreenGeometry()
00023     num_monitors = screen_geometry.get_num_monitors()
00024 
00025     # it doesn't make sense to set only_primary when we're running in a single-monitor setup.
00026     if num_monitors == 1:
00027         return [('Single Monitor', {'launcher_monitor': 0, 'only_primary': False})]
00028 
00029     monitor_scenarios = [('Monitor %d' % (i), {'launcher_monitor': i}) for i in range(num_monitors)]
00030     launcher_mode_scenarios = [('launcher_on_primary', {'only_primary': True}),
00031                                 ('launcher on all', {'only_primary': False})]
00032     return multiply_scenarios(monitor_scenarios, launcher_mode_scenarios)
00033