本文整理汇总了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))
示例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")
示例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")
示例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)
示例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)
示例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]
示例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())
示例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)
示例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())
示例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]
示例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))
示例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)
示例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)
示例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())
示例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)