From 59fc835b88749f3f7d7c251ded944b2be7df866e Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sat, 22 Apr 2017 13:17:09 +0200 Subject: [PATCH] [tests] Fix broken cmus test Adding scrollable output broke the cmus test. --- tests/modules/test_cmus.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/modules/test_cmus.py b/tests/modules/test_cmus.py index e7118d1..ce1f77c 100644 --- a/tests/modules/test_cmus.py +++ b/tests/modules/test_cmus.py @@ -44,10 +44,22 @@ tag comment comment album="an album", status="irrelevant" ), None) self.module.update_all() + self.anyWidget.set("theme.width", 1000) self.assertEquals(self.module.description(self.anyWidget), "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): self.popen.mock.communicate.return_value = ("set repeat false", None) self.module.update_all()