from unittest import TestCase from benchmark.zellers_birthday import zeller class Test_zeller(TestCase): # distances_true = {1: [0], 2: [0], 3: [0], 4: [27], 5: [0], 6: [0], 7: [0], 8: [6, 5, 4, 3, 2, 1, 0]} # distances_false = {1: [607], 2: [301], 3: [51], 4: [0], 5: [51], 6: [0], 7: [1], 8: [0, 0, 0, 0, 0, 0, 1]} def test_zeller_1(self): assert zeller(d=-638, m=313, y=49) == 'Saturday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [35], 5: [0], 6: [0], 7: [0], 8: [6, 5, 4, 3, 2, 1, 0]} # distances_false = {1: [125], 2: [1], 3: [43], 4: [0], 5: [43], 6: [0], 7: [1], 8: [0, 0, 0, 0, 0, 0, 1]} def test_zeller_2(self): assert zeller(d=-156, m=13, y=-57) == 'Saturday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [1], 5: [0], 6: [0], 7: [10], 8: [3, 2, 1, 0]} # distances_false = {1: [600], 2: [863], 3: [77], 4: [0], 5: [77], 6: [1], 7: [0], 8: [0, 0, 0, 1]} def test_zeller_3(self): assert zeller(d=-631, m=-875, y=23) == 'Wednesday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [37], 5: [0], 6: [0], 7: [1], 8: [6, 5, 4, 3, 2, 1, 0]} # distances_false = {1: [571], 2: [458], 3: [41], 4: [0], 5: [41], 6: [0], 7: [0], 8: [0, 0, 0, 0, 0, 0, 1]} def test_zeller_4(self): assert zeller(d=602, m=-470, y=59) == 'Saturday' # distances_true = {1: [0], 2: [1], 3: [0], 4: [3], 5: [0], 6: [0], 7: [10], 8: [1, 0]} # distances_false = {1: [392], 2: [0], 3: [75], 4: [0], 5: [75], 6: [0], 7: [0], 8: [0, 1]} def test_zeller_5(self): assert zeller(d=423, m=12, y=-25) == 'Monday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [0], 5: [1903], 7: [9], 8: [0]} # distances_false = {1: [9], 2: [898], 3: [98], 4: [21], 5: [0], 7: [0], 8: [1]} def test_zeller_6(self): assert zeller(d=40, m=910, y=2) == 'Sunday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [77], 5: [0], 6: [0], 7: [3], 8: [4, 3, 2, 1, 0]} # distances_false = {1: [584], 2: [652], 3: [1], 4: [0], 5: [1], 6: [0], 7: [0], 8: [0, 0, 0, 0, 1]} def test_zeller_7(self): assert zeller(d=-615, m=-664, y=-99) == 'Thursday' # distances_true = {1: [0], 2: [0], 3: [0], 4: [0], 5: [1923], 7: [1], 8: [4, 3, 2, 1, 0]} # distances_false = {1: [40], 2: [758], 3: [78], 4: [1], 5: [0], 7: [0], 8: [0, 0, 0, 0, 1]} def test_zeller_8(self): assert zeller(d=-71, m=-770, y=-22) == 'Thursday' # distances_true = {1: [0], 2: [0], 3: [901], 5: [901], 7: [4], 8: [0]} # distances_false = {1: [338], 2: [905], 3: [0], 5: [0], 7: [0], 8: [1]} def test_zeller_9(self): assert zeller(d=369, m=-917, y=-1000) == 'Sunday'