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()