from unittest import TestCase from benchmark.zellers_birthday import zeller class Test_zeller(TestCase): # distances_true = {1: [13], 2: [0], 3: [0], 4: [4], 5: [0], 6: [0], 7: [0], 8: [2, 1, 0]} # distances_false = {1: [0], 2: [408], 3: [74], 4: [0], 5: [74], 6: [4], 7: [2], 8: [0, 0, 1]} def test_zeller_1(self): assert zeller(d=19, m=420, y=-26) == 'Tuesday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [9], 5: [0], 6: [0], 7: [0], 8: [3, 2, 1, 0]} # distances_false = {1: [544], 2: [397], 3: [69], 4: [0], 5: [69], 6: [9], 7: [1], 8: [0, 0, 0, 1]} def test_zeller_2(self): assert zeller(d=-575, m=-409, y=31) == 'Wednesday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [0], 5: [1923], 7: [8], 8: [5, 4, 3, 2, 1, 0]} # distances_false = {1: [547], 2: [393], 3: [78], 4: [1], 5: [0], 7: [0], 8: [0, 0, 0, 0, 0, 1]} def test_zeller_3(self): assert zeller(d=-578, m=-405, y=22) == 'Friday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [0], 5: [1923], 7: [0], 8: [1, 0]} # distances_false = {1: [547], 2: [397], 3: [78], 4: [1], 5: [0], 7: [1], 8: [0, 1]} def test_zeller_4(self): assert zeller(d=-578, m=-409, y=22) == 'Monday' # distances_true = {1: [0], 2: [4], 3: [0], 4: [0], 5: [1922], 7: [7], 8: [0]} # distances_false = {1: [862], 2: [0], 3: [79], 4: [2], 5: [0], 7: [0], 8: [1]} def test_zeller_5(self): assert zeller(d=893, m=9, y=-21) == 'Sunday'