forked from hiratara/offline-DOUKAKU-skeletons
/
test.py
29 lines (26 loc) · 910 Bytes
/
test.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
import unittest
from answer import solve
class TestSequenceFunctions(unittest.TestCase):
def test(self):
with open('patterns.tsv') as f:
for line in f:
num, inputted, expected = line.rstrip().split("\t")
self.assertEqual(
solve(inputted), expected, "%s failed" % num
)
if __name__ == '__main__':
unittest.main()
# % python2.7 test.py
# F
# ======================================================================
# FAIL: test (__main__.TestSequenceFunctions)
# ----------------------------------------------------------------------
# Traceback (most recent call last):
# File "test.py", line 10, in test
# solve(inputted), expected, "%s failed" % num
# AssertionError: #2 failed
#
# ----------------------------------------------------------------------
# Ran 1 test in 0.000s
#
# FAILED (failures=1)