This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
kse-02/tests/test_zellers_birthday.py

20 lines
929 B
Python
Raw Normal View History

2023-12-09 19:52:07 +00:00
from unittest import TestCase
from benchmark.zellers_birthday import zeller
class Test_zeller(TestCase):
2023-12-18 14:13:31 +00:00
# distances_true = {1: [0], 2: [0], 3: [901], 5: [901], 7: [0], 8: [3, 2, 1, 0]}
# distances_false = {1: [1], 2: [913], 3: [0], 5: [0], 7: [1], 8: [0, 0, 0, 1]}
2023-12-09 19:52:07 +00:00
def test_zeller_1(self):
2023-12-18 14:13:31 +00:00
assert zeller(d=32, m=-925, y=-1000) == 'Wednesday'
2023-12-09 19:52:07 +00:00
2023-12-18 14:13:31 +00:00
# distances_true = {1: [0], 2: [0], 3: [0], 4: [0], 5: [1903], 7: [7], 8: [2, 1, 0]}
# distances_false = {1: [691], 2: [536], 3: [98], 4: [21], 5: [0], 7: [0], 8: [0, 0, 1]}
2023-12-09 19:52:07 +00:00
def test_zeller_2(self):
2023-12-18 14:13:31 +00:00
assert zeller(d=-722, m=548, y=-2) == 'Tuesday'
2023-12-09 19:52:07 +00:00
2023-12-18 14:13:31 +00:00
# distances_true = {1: [0], 2: [7], 3: [0], 4: [1], 5: [0], 6: [0], 7: [4], 8: [4, 3, 2, 1, 0]}
# distances_false = {1: [285], 2: [0], 3: [77], 4: [0], 5: [77], 6: [1], 7: [0], 8: [0, 0, 0, 0, 1]}
2023-12-09 19:52:07 +00:00
def test_zeller_3(self):
2023-12-18 14:13:31 +00:00
assert zeller(d=316, m=6, y=-23) == 'Thursday'