-
Notifications
You must be signed in to change notification settings - Fork 13
/
generaltest.py
executable file
·46 lines (32 loc) · 1.03 KB
/
generaltest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/env python3
import sys
from SubtitleExtractor import Subtitle
from HuluTest import HuluTestList
from BbcTest import BbcTestList
from FoxTest import FoxTestList
from AmazonTest import AmazonTestList
def main():
testList = AmazonTestList
Extractor = Subtitle()
counter = 0
failureList = []
for entities in testList:
url = entities[0]
Extractor.getServiceName(url)
Extractor.testMode = True
# if len(entities) == 5:
returnValue = Extractor.serviceProcess()
if returnValue:
print("File %d successful" % (counter + 1))
else:
print("Test Failed on File - %d" % (counter + 1))
failureList.append([counter + 1, url])
counter += 1
print(
"\n\n\n------------------------------------------------------------------------\n\n")
if len(failureList):
print("Test failed on files -")
for i in failureList:
print("<%d> - URL : %s" % (i[0], i[1]))
if __name__ == "__main__":
main()