本文整理汇总了Python中miro.frontends.widgets.widgetstatestore.WidgetStateStore.get_album_view_type方法的典型用法代码示例。如果您正苦于以下问题:Python WidgetStateStore.get_album_view_type方法的具体用法?Python WidgetStateStore.get_album_view_type怎么用?Python WidgetStateStore.get_album_view_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类miro.frontends.widgets.widgetstatestore.WidgetStateStore
的用法示例。
在下文中一共展示了WidgetStateStore.get_album_view_type方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_view_types
# 需要导入模块: from miro.frontends.widgets.widgetstatestore import WidgetStateStore [as 别名]
# 或者: from miro.frontends.widgets.widgetstatestore.WidgetStateStore import get_album_view_type [as 别名]
def test_view_types(self):
# test that all view types are different
view_types = (WidgetStateStore.get_list_view_type(),
WidgetStateStore.get_standard_view_type(),
WidgetStateStore.get_album_view_type())
for i in range(len(view_types)):
for j in range(i + 1, len(view_types)):
self.assertNotEqual(view_types[i], view_types[j])
示例2: test_default_column_widths
# 需要导入模块: from miro.frontends.widgets.widgetstatestore import WidgetStateStore [as 别名]
# 或者: from miro.frontends.widgets.widgetstatestore.WidgetStateStore import get_album_view_type [as 别名]
def test_default_column_widths(self):
# test that all available columns have widths set for them
# calculate all columns that available for some display/view
# combination
available_columns = set()
display_id = None # this isn't used yet, just set it to a dummy value
for display_type in self.display_types:
for view_type in (WidgetStateStore.get_list_view_type(),
WidgetStateStore.get_standard_view_type(),
WidgetStateStore.get_album_view_type()):
available_columns.update(
WidgetStateStore.get_columns_available(
display_type, display_id, view_type))
# make sure that we have widths for those columns
self.assertEqual(available_columns,
set(WidgetStateStore.DEFAULT_COLUMN_WIDTHS.keys()))