How to use the castero.players.mpvplayer.MPVPlayer 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_player_mpvplayer.py View on Github external
def test_player_mpv_init():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    assert isinstance(myplayer, MPVPlayer)
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_episode():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    assert myplayer.episode == episode
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_change_rate_increase():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()

    myplayer._player.speed = 1
    myplayer.change_rate(1)
    assert myplayer._player.speed == 1.1
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_str():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    assert str(myplayer) == "[%s] %s" % (episode.feed_str, myplayer.title)
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_pause():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()

    myplayer.pause()
    assert myplayer.state == 2
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_stop():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()

    myplayer.stop()
    assert myplayer.state == 0
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_change_rate_display():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()
    display = mock.MagicMock()

    myplayer._player.speed = 1
    myplayer.change_rate(1, display=display)
    assert display.change_status.call_count == 1
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_check_dependencies():
    assert MPVPlayer.check_dependencies
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_time():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    myplayer._player = mock.MagicMock()

    myplayer._player.time_pos = 5
    assert myplayer.time == 5000
github xgi / castero / tests / test_player_mpvplayer.py View on Github external
def test_player_mpv_title():
    myplayer = MPVPlayer("player1 title", "player1 path", episode)
    assert myplayer.title == "player1 title"