mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-15 01:15:05 +00:00
Fix tv test to init recently added ReleaseMap.
Fix double use of var `result` overwrites the return value and causes an error in _parse_custom_exceptions. Change remove Python 3.7 from CI
This commit is contained in:
parent
2c784e215c
commit
c75ef36cfe
3 changed files with 41 additions and 41 deletions
6
.github/workflows/unittest.yml
vendored
6
.github/workflows/unittest.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
matrix:
|
||||
os:
|
||||
- windows-latest
|
||||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||
python-version: ['3.8', '3.9', '3.10', '3.11']
|
||||
steps:
|
||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||
uses: actions/setup-python@v4
|
||||
|
@ -34,7 +34,7 @@ jobs:
|
|||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||
python-version: ['3.8', '3.9', '3.10', '3.11']
|
||||
steps:
|
||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||
uses: actions/setup-python@v4
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||
python-version: ['3.8', '3.9', '3.10', '3.11']
|
||||
steps:
|
||||
- name: 'Set up Python ${{ matrix.python-version }}'
|
||||
uses: actions/setup-python@v4
|
||||
|
|
|
@ -362,11 +362,9 @@ class ReleaseMap(Job):
|
|||
else:
|
||||
used.add((cur_for_season, cur_for_episode))
|
||||
if not sn or sn != (target_season, cur_target_episode): # not already set
|
||||
result = set_scene_numbering_helper(
|
||||
count_updated_numbers += int(bool(set_scene_numbering_helper(
|
||||
tvid, prodid, for_season=cur_for_season, for_episode=cur_for_episode,
|
||||
scene_season=target_season, scene_episode=cur_target_episode)
|
||||
if result.get('success'):
|
||||
count_updated_numbers += 1
|
||||
scene_season=target_season, scene_episode=cur_target_episode).get('success')))
|
||||
|
||||
cur_for_episode += 1
|
||||
|
||||
|
|
|
@ -24,12 +24,12 @@ import datetime
|
|||
import copy
|
||||
import sickgear
|
||||
from sickgear.tv import TVEpisode, TVShow, TVidProdid, prodid_bitshift
|
||||
from exceptions_helper import ex, MultipleShowObjectsException
|
||||
from exceptions_helper import MultipleShowObjectsException
|
||||
from sickgear.helpers import find_show_by_id
|
||||
from sickgear import indexermapper
|
||||
from sickgear.indexers.indexer_api import TVInfoAPI
|
||||
from sickgear.indexers.indexer_config import TVINFO_IMDB, TVINFO_TMDB, TVINFO_TRAKT, TVINFO_TVDB, TVINFO_TVMAZE, \
|
||||
TVINFO_TVRAGE
|
||||
from sickgear.indexers.indexer_config import TVINFO_IMDB, TVINFO_TMDB, TVINFO_TVDB, TVINFO_TVMAZE, TVINFO_TVRAGE
|
||||
from sickgear.scene_exceptions import ReleaseMap
|
||||
|
||||
# noinspection PyUnreachableCode
|
||||
if False:
|
||||
|
@ -42,6 +42,7 @@ class TVShowTests(test.SickbeardTestDBCase):
|
|||
super(TVShowTests, self).setUp()
|
||||
sickgear.showList = []
|
||||
sickgear.showDict = {}
|
||||
_ = ReleaseMap()
|
||||
|
||||
def test_init_indexerid(self):
|
||||
show_obj = TVShow(1, 1, 'en')
|
||||
|
@ -81,6 +82,7 @@ class TVEpisodeTests(test.SickbeardTestDBCase):
|
|||
super(TVEpisodeTests, self).setUp()
|
||||
sickgear.showList = []
|
||||
sickgear.showDict = {}
|
||||
_ = ReleaseMap()
|
||||
|
||||
def test_init_empty_db(self):
|
||||
show_obj = TVShow(1, 1, 'en')
|
||||
|
@ -229,7 +231,7 @@ find_tests = [
|
|||
{'para': {'show_id': '%s:123' % TVINFO_TVDB, 'check_multishow': True},
|
||||
'result': {'tvid': TVINFO_TVDB, 'prodid': 123},
|
||||
'description': 'simple search via tvid_prodid string and check multishow'},
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
class TVFindTests(test.SickbeardTestDBCase):
|
||||
|
|
Loading…
Reference in a new issue