Exemplo n.º 1
0
def test_remove_punctuation():
    string = "This-is_a/test\\string!@#$%$*&*(%)-=+_`~"
    expected = "Thisisateststring"

    assert_equal(utils.remove_punctuation(string), expected)

    string = "this is a test string"
    expected = "this is a test string"

    assert_equal(utils.remove_punctuation(string), expected)
Exemplo n.º 2
0
def test_remove_punctuation():
    string = "This-is_a/test\\string!@#$%$*&*(%)-=+_`~"
    expected = "Thisisateststring"

    assert_equal(utils.remove_punctuation(string), expected)

    string = "this is a test string"
    expected = "this is a test string"

    assert_equal(utils.remove_punctuation(string), expected)
Exemplo n.º 3
0
    def findShow(self):
        showTitle = utils.remove_punctuation(self.epLine.text().strip())

        if not showTitle:
            InfoMessage(self, "Find Show", "No show specified")
            return

        Settings.title = showTitle

        show_locater.setShow(showTitle)
        self.show = show_locater.getShow()
        self.formatter.show = self.show
        self.show.formatter = self.formatter
        self.episodes = self.show.episodes + self.show.specials
        self.seasonBox.clear()
        self.seasonBox.addItem("All Seasons")
        if self.episodes:
            for s in xrange(self.show.num_seasons):
                self.seasonBox.addItem(str(s + 1))

        self.updater.update_episodes.emit()
Exemplo n.º 4
0
    def findShow(self):
        showTitle = utils.remove_punctuation(self.epLine.text().strip())

        if not showTitle:
            InfoMessage(self, "Find Show", "No show specified")
            return

        Settings.title = showTitle

        show_locater.setShow(showTitle)
        self.show = show_locater.getShow()
        self.formatter.show = self.show
        self.show.formatter = self.formatter
        self.episodes = self.show.episodes + self.show.specials
        self.seasonBox.clear()
        self.seasonBox.addItem("All Seasons")
        if self.episodes:
            for s in xrange(self.show.num_seasons):
                self.seasonBox.addItem(str(s + 1))

        self.updater.update_episodes.emit()