summaryrefslogtreecommitdiff
path: root/14/test.py
diff options
context:
space:
mode:
Diffstat (limited to '14/test.py')
-rwxr-xr-x14/test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/14/test.py b/14/test.py
new file mode 100755
index 0000000..25012d4
--- /dev/null
+++ b/14/test.py
@@ -0,0 +1,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()