[tests] Fix broken cmus test
Adding scrollable output broke the cmus test.
This commit is contained in:
parent
0f34826cac
commit
59fc835b88
1 changed files with 12 additions and 0 deletions
|
@ -44,10 +44,22 @@ tag comment comment
|
||||||
album="an album", status="irrelevant"
|
album="an album", status="irrelevant"
|
||||||
), None)
|
), None)
|
||||||
self.module.update_all()
|
self.module.update_all()
|
||||||
|
self.anyWidget.set("theme.width", 1000)
|
||||||
self.assertEquals(self.module.description(self.anyWidget),
|
self.assertEquals(self.module.description(self.anyWidget),
|
||||||
"an artist - a title 00:20/01:40"
|
"an artist - a title 00:20/01:40"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_scrollable_format(self):
|
||||||
|
self.popen.mock.communicate.return_value = (self.songTemplate.format(
|
||||||
|
artist="an artist", title="a title", duration="100", position="20",
|
||||||
|
album="an album", status="irrelevant"
|
||||||
|
), None)
|
||||||
|
self.module.update_all()
|
||||||
|
self.anyWidget.set("theme.width", 10)
|
||||||
|
self.assertEquals(self.module.description(self.anyWidget),
|
||||||
|
"an artist - a title 00:20/01:40"[:10]
|
||||||
|
)
|
||||||
|
|
||||||
def test_repeat(self):
|
def test_repeat(self):
|
||||||
self.popen.mock.communicate.return_value = ("set repeat false", None)
|
self.popen.mock.communicate.return_value = ("set repeat false", None)
|
||||||
self.module.update_all()
|
self.module.update_all()
|
||||||
|
|
Loading…
Reference in a new issue