]> git.friedersdorff.com Git - max/python_unittesting.git/blob - 3_collatz.py
Add README that outlines unittesting
[max/python_unittesting.git] / 3_collatz.py
1 from collatz import collatz, longest_collatz
2
3 def test_length_collatz_13():
4     assert collatz(13) == 9
5
6 def test_length_collatz_9():
7     assert collatz(9) == 19
8
9 def test_length_collatz_77031():
10     assert collatz(77031) == 350
11
12 def test_length_collatz_8400511():
13     assert collatz(8400511) == 685
14
15
16 def test_longest_collatz_under_1_000_000():
17     assert longest_collatz(1000000) == 837799
18
19 def test_longest_collatz_under_1_000_000_000():
20     assert longest_collatz(1000000000) == 670617279