blob: 3e0d5e5c534f57560db8e3a9010c6268e85bf10c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env python3
import unittest
ch_1 = __import__('ch-1')
ch_2 = __import__('ch-2')
class TestClass(unittest.TestCase):
def test_ch_1(self):
self.assertEqual(
ch_1.binary_date('2025-07-26'),
'11111101001-111-11010'
)
self.assertEqual(
ch_1.binary_date('2000-02-02'),
'11111010000-10-10'
)
self.assertEqual(
ch_1.binary_date('2024-12-31'),
'11111101000-1100-11111'
)
def test_ch_2(self):
self.assertFalse(ch_2.odd_letters('weekly'))
self.assertTrue(ch_2.odd_letters('perl'))
self.assertFalse(ch_2.odd_letters('challenge'))
if __name__ == '__main__':
unittest.main()
|