summaryrefslogtreecommitdiff
path: root/14/test.py
blob: 25012d431c460097bf2eb2a5d8875a077b6f7fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python

import unittest

import main



class Examples(unittest.TestCase):
    def test_example1(self):
        lines = [
            "Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds.",
            "Dancer can fly 16 km/s for 11 seconds, but then must rest for 162 seconds."
        ]
        self.assertEqual(main.solve_partn(1, lines, 1000), 1120)
        self.assertEqual(main.solve_partn(2, lines, 1000),  689)



if __name__ == "__main__":
    unittest.main()