-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_parser.py
99 lines (71 loc) · 2.34 KB
/
test_parser.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# -*- coding: utf-8 -*-
import io
from parser1 import Parser
import unittest
files = [
'tmp\\test_paypal.html',
'tmp\\test_stripe.html',
'tmp\\test_yahoo.html',
'tmp\\test_taco-bell.html',
'tmp\\test_the-muse.html'
]
class Test_Parser(unittest.TestCase):
def test_ParseFunding(self):
for path in files:
print ('Parsing={}'.format(path))
with io.open(path, 'r', encoding='utf-8') as f:
data = f.read()
p = Parser()
r = p.parseFunding(data)
assert len(r)
print (r)
def test_Investors(self):
for path in files:
print ('Parsing={}'.format(path))
with io.open(path, 'r', encoding='utf-8') as f:
data = f.read()
p = Parser()
r = p.parseInvestors(data)
assert len(r)
print (r)
def test_Acquisitions(self):
for path in files:
print ('Parsing={}'.format(path))
with io.open(path, 'r', encoding='utf-8') as f:
data = f.read()
p = Parser()
r = p.parseAcquisitons(data)
assert len(r)
print (r)
def test_Description(self):
for path in files:
print ('Parsing={}'.format(path))
with io.open(path, 'r', encoding='utf-8') as f:
data = f.read()
p = Parser()
r = p.parseDescription(data)
assert len(r)
print (r)
def test_Investments(self):
for path in files:
print ('Parsing={}'.format(path))
with io.open(path, 'r', encoding='utf-8') as f:
data = f.read()
p = Parser()
r = p.parseInvestments(data)
#assert len(r)
print (r)
def test_BoardMembers(self):
for path in files:
print ('Parsing={}'.format(path))
with io.open(path, 'r', encoding='utf-8') as f:
data = f.read()
p = Parser()
r = p.parseBoardMembers(data)
#assert len(r)
print (r)
def test_ParseFile(self):
for path in files:
p = Parser()
p.parseFile(path)
break