mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 17:16:07 +01:00
Add minimal (no asserts) test for play plugin
This commit is contained in:
parent
390263a6e8
commit
25495d675c
1 changed files with 34 additions and 0 deletions
34
test/test_play.py
Normal file
34
test/test_play.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""Tests for the play plugin"""
|
||||
|
||||
from __future__ import (division, absolute_import, print_function,
|
||||
unicode_literals)
|
||||
|
||||
from mock import patch, Mock
|
||||
|
||||
from test._common import unittest
|
||||
from test.helper import TestHelper
|
||||
|
||||
from beetsplug.play import PlayPlugin
|
||||
|
||||
|
||||
class PlayPluginTest(unittest.TestCase, TestHelper):
|
||||
def setUp(self):
|
||||
self.setup_beets()
|
||||
self.load_plugins('play')
|
||||
self.add_item(title='aNiceTitle')
|
||||
|
||||
def tearDown(self):
|
||||
self.teardown_beets()
|
||||
self.unload_plugins()
|
||||
|
||||
@patch('beetsplug.play.util.interactive_open', Mock())
|
||||
def test_basic(self):
|
||||
self.run_command('play', 'title:aNiceTitle')
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
||||
if __name__ == b'__main__':
|
||||
unittest.main(defaultTest='suite')
|
||||
Loading…
Reference in a new issue