How to use the castero.menus.queuemenu.QueueMenu function in castero

To help you get started, we’ve selected a few castero examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_init():
    mymenu = QueueMenu(window, source)
    assert isinstance(mymenu, QueueMenu)
github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_init():
    mymenu = QueueMenu(window, source)
    assert isinstance(mymenu, QueueMenu)
github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_update_items():
    mymenu = QueueMenu(window, source)
    mymenu.update_items(None)
    assert len(mymenu._items) == 2
github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_items(mock_A_NORMAL):
    mymenu = QueueMenu(window, source)
    mymenu.update_items(feed)
    items = mymenu._items
    assert {
        'attr': mock_A_NORMAL,
        'tags': [],
        'text': str(player1)
    } in items
github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_update_child():
    mymenu = QueueMenu(window, source)
    mymenu.update_items(feed)
    items = mymenu._items
    mymenu.update_child()
    assert mymenu._items == items
github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_item_none():
    mymenu = QueueMenu(window, source)
    assert mymenu.item == source.__getitem__()
github xgi / castero / tests / test_menu_queue.py View on Github external
def test_menu_queue_metadata():
    mymenu = QueueMenu(window, source)
    mymenu.update_items(feed)
    assert mymenu.metadata == player1.episode.metadata
github xgi / castero / castero / perspectives / queueperspective.py View on Github external
def create_menus(self) -> None:
        """Create the menus used in each window.

        Overrides method from Perspective; see documentation in that class.
        """
        assert self._queue_window is not None

        self._queue_menu = QueueMenu(self._queue_window, self._display.queue,
                                     active=True)