]> git.friedersdorff.com Git - max/python_unittesting.git/blobdiff - 2_troubleshooting.py
Add incorrect ackermann implementation and tests
[max/python_unittesting.git] / 2_troubleshooting.py
diff --git a/2_troubleshooting.py b/2_troubleshooting.py
new file mode 100644 (file)
index 0000000..e4b91c6
--- /dev/null
@@ -0,0 +1,17 @@
+from ackermann_attempt import incorrect_ackermann
+
+
+def test_ackermann_3_3():
+    assert incorrect_ackermann(3, 3) == 61
+
+def test_ackermann_0_0():
+    assert incorrect_ackermann(0, 0) == 1
+
+def test_ackermann_4_0():
+    assert incorrect_ackermann(4, 0) == 13
+
+def test_ackermann_0_4():
+    assert incorrect_ackermann(0, 4) == 5
+
+def test_ackermann_3_5():
+    assert incorrect_ackermann(3, 5) == 253