当前位置: 首页>>代码示例>>Python>>正文


Python TVShow.name方法代码示例

本文整理汇总了Python中sickbeard.tv.TVShow.name方法的典型用法代码示例。如果您正苦于以下问题:Python TVShow.name方法的具体用法?Python TVShow.name怎么用?Python TVShow.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sickbeard.tv.TVShow的用法示例。


在下文中一共展示了TVShow.name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _test_allPossibleShowNames

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
 def _test_allPossibleShowNames(self, name, tvdbid=0, tvrname=None, expected=[]):
     s = Show(tvdbid)
     s.name = name
     s.tvrname = tvrname
     
     result = show_name_helpers.allPossibleShowNames(s)
     self.assertTrue(len(set(expected).intersection(set(result))) == len(expected))
开发者ID:enefem,项目名称:Sick-Beard,代码行数:9,代码来源:scene_helpers_tests.py

示例2: test_set_name

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
 def test_set_name(self):
     """
     test set name
     """
     show = TVShow(1, 1, "en")
     show.name = "newName"
     show.save_to_db()
     show._load_from_db()
     self.assertEqual(show.name, "newName")
开发者ID:Thraxis,项目名称:pymedusa,代码行数:11,代码来源:tv_tests.py

示例3: test_set_name

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
 def test_set_name(self):
     """
     test set name
     """
     show = TVShow(1, 1, "en")
     show.name = "newName"
     show.saveToDB()
     show.loadFromDB()
     self.assertEqual(show.name, "newName")
开发者ID:murbaniak,项目名称:SickRage,代码行数:11,代码来源:tv_tests.py

示例4: _test_allPossibleShowNames

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def _test_allPossibleShowNames(self, name, tvdbid=0, tvrname=None, expected=[]):
        s = Show(tvdbid)
        s.name = name
        s.tvrname = tvrname
        result = show_name_helpers.allPossibleShowNames(s)
        
        result = [unicode(x) for x in sorted(result)]
        expected = [unicode(x) for x in sorted(expected)]

        #self.assertEqual(len(set(expected).intersection(set(result))), len(expected))
        self.assertEqual(result, expected)
开发者ID:Pakoach,项目名称:Sick-Beard-Animes,代码行数:13,代码来源:scene_helpers_tests.py

示例5: setUpClass

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def setUpClass(cls):
        cls.shows = []

        show = TVShow(1, 121361)
        show.name = "Italian Works"
        show.episodes = []
        episode = TVEpisode(show, 05, 10)
        episode.name = "Pines of Rome"
        episode.scene_season = 5
        episode.scene_episode = 10
        show.episodes.append(episode)
        cls.shows.append(show)
开发者ID:gondalez,项目名称:SickRage,代码行数:14,代码来源:torrent_tests.py

示例6: test_getEpisode

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
 def test_getEpisode(self):
     show = TVShow(1, 1, "en")
     show.name = "show name"
     show.tvrname = "show name"
     show.network = "cbs"
     show.genre = "crime"
     show.runtime = 40
     show.status = "5"
     show.airs = "monday"
     show.startyear = 1987
     show.saveToDB()
     sickbeard.showList = [show]
开发者ID:joshguerette,项目名称:SickGear,代码行数:14,代码来源:tv_tests.py

示例7: test_process

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def test_process(self):
        show = TVShow(3)
        show.name = test.SHOWNAME
        show.location = test.SHOWDIR
        show.saveToDB()

        sickbeard.showList = [show]
        ep = TVEpisode(show, test.SEASON, test.EPISODE)
        ep.name = "some ep name"
        ep.saveToDB()

        pp = PostProcessor(test.FILEPATH)
        self.assertTrue(pp.process())
开发者ID:089git,项目名称:Sick-Beard,代码行数:15,代码来源:pp_tests.py

示例8: test

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
 def test(self):
     show = TVShow(tvdb_id)
     show.name = data[0]
     if data[1]:
         show.anime = 1
     show.saveToDB()
     showList = [show]
     sceneName = data[2]
     result = helpers.get_show_by_name(sceneName, showList, False)
     if not result:
         self.assertEqual(False, show.tvdbid)
         return False
     self.assertEqual(result.tvdbid, show.tvdbid)
开发者ID:Pakoach,项目名称:Sick-Beard-Animes,代码行数:15,代码来源:helpers_test.py

示例9: test_process

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def test_process(self):
        show = TVShow(1, 3)
        show.name = SHOWNAME
        show.location = SHOWDIR
        show.saveToDB()

        sickbeard.showList = [show]
        ep = TVEpisode(show, SEASON, EPISODE)
        ep.name = "some ep name"
        ep.saveToDB()

        addNameToCache('show name', 3)
        self.pp = PostProcessor(FILEPATH, process_method='move')
        self.assertTrue(self.pp.process())
开发者ID:coderbone,项目名称:SickRage,代码行数:16,代码来源:test_pp.py

示例10: test_get_episode

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
 def test_get_episode():
     """
     Test get episodes
     """
     show = TVShow(1, 1, "en")
     show.name = "show name"
     show.network = "cbs"
     show.genre = "crime"
     show.runtime = 40
     show.status = "Ended"
     show.default_ep_status = "5"
     show.airs = "monday"
     show.startyear = 1987
     show.saveToDB()
     sickbeard.showList = [show]
开发者ID:murbaniak,项目名称:SickRage,代码行数:17,代码来源:tv_tests.py

示例11: _test_all_possible_show_names

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def _test_all_possible_show_names(self, name, indexerid=0, expected=None):
        """
        Test all possible show names

        :param name:
        :param indexerid:
        :param expected:
        :return:
        """
        expected = [] if expected is None else expected
        show = Show(1, indexerid)
        show.name = name

        result = show_name_helpers.allPossibleShowNames(show)
        self.assertTrue(len(set(expected).intersection(set(result))) == len(expected))
开发者ID:feld,项目名称:SickRage,代码行数:17,代码来源:scene_helpers_tests.py

示例12: setUpClass

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def setUpClass(cls):
        num_legacy_shows = 3
        num_shows = 3
        num_episodes_per_show = 5
        cls.mydb = db.DBConnection()
        cls.legacy_shows = []
        cls.shows = []

        # Per-show-notifications were originally added for email notifications only.  To add
        # this feature to other notifiers, it was necessary to alter the way text is stored in
        # one of the DB columns.  Therefore, to test properly, we must create some shows that
        # store emails in the old method (legacy method) and then other shows that will use
        # the new method.
        for show_counter in range(100, 100+num_legacy_shows):
            show = TVShow(1, show_counter)
            show.name = "Show "+str(show_counter)
            show.episodes = []
            for episode_counter in range(0, num_episodes_per_show):
                episode = TVEpisode(show, test.SEASON, episode_counter)
                episode.name = "Episode "+str(episode_counter+1)
                episode.quality = "SDTV"
                show.episodes.append(episode)
            show.saveToDB()
            cls.legacy_shows.append(show)

        for show_counter in range(200, 200+num_shows):
            show = TVShow(1, show_counter)
            show.name = "Show "+str(show_counter)
            show.episodes = []
            for episode_counter in range(0, num_episodes_per_show):
                episode = TVEpisode(show, test.SEASON, episode_counter)
                episode.name = "Episode "+str(episode_counter+1)
                episode.quality = "SDTV"
                show.episodes.append(episode)
            show.saveToDB()
            cls.shows.append(show)
开发者ID:feld,项目名称:SickRage,代码行数:38,代码来源:notifier_tests.py

示例13: test_isGoodName

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def test_isGoodName(self):
        listOfcases = [('Show.Name.S01E02.Test-Test', 'Show/Name'),
                        ('Show.Name.S01E02.Test-Test', 'Show. Name'),
                        ('Show.Name.S01E02.Test-Test', 'Show- Name'),
                        ('Show.Name.Part.IV.Test-Test', 'Show Name'),
                        ('Show.Name.S01.Test-Test', 'Show Name'),
                        ('Show.Name.E02.Test-Test', 'Show: Name'),
                        ('Show Name Season 2 Test', 'Show: Name'),
                        ]

        for testCase in listOfcases:
            scene_name, show_name = testCase
            s = Show(0)
            s.name = show_name
            self._test_isGoodName(scene_name, s)
开发者ID:3ne,项目名称:SickRage,代码行数:17,代码来源:scene_helpers_tests.py

示例14: test_process

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def test_process(self):
        show = TVShow(1,3)
        show.name = test.SHOWNAME
        show.location = test.SHOWDIR
        show.saveToDB()

        sickbeard.showList = [show]
        ep = TVEpisode(show, test.SEASON, test.EPISODE)
        ep.name = "some ep name"
        ep.saveToDB()

        addNameToCache('show name', 3)
        sickbeard.PROCESS_METHOD = 'move'

        pp = PostProcessor(test.FILEPATH)
        self.assertTrue(pp.process())
开发者ID:Boobahbaggins27,项目名称:SickRage,代码行数:18,代码来源:pp_tests.py

示例15: test_is_good_name

# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import name [as 别名]
    def test_is_good_name(self):
        """
        Perform good name tests
        """
        list_of_cases = [('Show.Name.S01E02.Test-Test', 'Show/Name'),
                         ('Show.Name.S01E02.Test-Test', 'Show. Name'),
                         ('Show.Name.S01E02.Test-Test', 'Show- Name'),
                         ('Show.Name.Part.IV.Test-Test', 'Show Name'),
                         ('Show.Name.S01.Test-Test', 'Show Name'),
                         ('Show.Name.E02.Test-Test', 'Show: Name'),
                         ('Show Name Season 2 Test', 'Show: Name'), ]

        for test_case in list_of_cases:
            scene_name, show_name = test_case
            show = Show(1, 0)
            show.name = show_name
            self._test_is_good_name(scene_name, show)
开发者ID:feld,项目名称:SickRage,代码行数:19,代码来源:scene_helpers_tests.py


注:本文中的sickbeard.tv.TVShow.name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。