mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-16 01:45:08 +00:00
e56303798c
Initial SickGear for Python 3.
30 lines
1 KiB
Python
30 lines
1 KiB
Python
import warnings
|
|
warnings.filterwarnings('ignore', module=r'.*fuz.*', message='.*Sequence.*')
|
|
warnings.filterwarnings('ignore', module=r'.*connectionpool.*', message='.*certificate verification.*')
|
|
|
|
import unittest
|
|
|
|
from sickgear import properFinder
|
|
|
|
import sickgear
|
|
import test_lib as test
|
|
|
|
sickgear.SYS_ENCODING = 'UTF-8'
|
|
|
|
|
|
class ProperTests(test.SickbeardTestDBCase):
|
|
def check_webdl_type(self, cases):
|
|
for c in cases:
|
|
self.assertEqual(properFinder.get_webdl_type(*c[0]), c[1])
|
|
|
|
def test_webdl_type(self):
|
|
self.check_webdl_type([
|
|
(('1080p.WEB.x264', 'The.Show.Name.S04E10.1080p.WEB.x264-GROUP'), 'webrip'),
|
|
(('720p.WEB-DL.DD5.1.H.264', 'The.Show.Name.720p.WEB-DL.DD5.1.H.264-GROUP'), 'webdl'),
|
|
(('1080p.AMZN.WEB-DL.DD5.1.H.264', 'The.Show.Name.1080p.AMZN.WEB-DL.DD5.1.H.264-GROUP'), 'Amazon'),
|
|
])
|
|
|
|
|
|
if '__main__' == __name__:
|
|
suite = unittest.TestLoader().loadTestsFromTestCase(ProperTests)
|
|
unittest.TextTestRunner(verbosity=2).run(suite)
|