Ejemplo n.º 1
0
    def test_group(self):
        p = PaneConfig(r"a\:b:<title>")
        self.failUnlessEqual(p.title, "A:B")
        self.failUnlessEqual(set(p.format_display(ALBUM).split(", ")),
                             {"one", "two", "three", "four", "xxx"})

        p = PaneConfig("foo:~#lastplayed")
        self.failUnlessEqual(p.format_display(ALBUM), "0")

        p = PaneConfig("foo:title")
        self.failUnlessEqual(set(p.format_display(ALBUM).split(", ")),
                             {"one", "two", "three", "four", "xxx"})
Ejemplo n.º 2
0
    def test_group(self):
        p = PaneConfig("a\:b:<title>")
        self.failUnlessEqual(p.title, "A:B")
        self.failUnlessEqual(set(p.format_display(ALBUM).split(", ")),
                             set(["one", "two", "three", "four", "xxx"]))

        p = PaneConfig("foo:~#lastplayed")
        self.failUnlessEqual(p.format_display(ALBUM), "0")

        p = PaneConfig("foo:title")
        self.failUnlessEqual(set(p.format_display(ALBUM).split(", ")),
                             set(["one", "two", "three", "four", "xxx"]))
Ejemplo n.º 3
0
    def test_tag(self):
        p = PaneConfig("title")
        self.failUnlessEqual(p.title, "Title")
        self.failUnlessEqual(p.tags, {"title"})

        self.failUnlessEqual(p.format(SONGS[0]), [("three", "three")])
        self.failUnless(str(len(ALBUM.songs)) in p.format_display(ALBUM))
        self.failIf(p.has_markup)
Ejemplo n.º 4
0
    def test_tag(self):
        p = PaneConfig("title")
        self.failUnlessEqual(p.title, "Title")
        self.failUnlessEqual(p.tags, set(["title"]))

        self.failUnlessEqual(p.format(SONGS[0]), ["three"])
        self.failUnless(str(len(ALBUM.songs)) in p.format_display(ALBUM))
        self.failIf(p.has_markup)