コード例 #1
0
 def test_dse_fest_fion_reflective(self):
     for i in range(0, self.iters):
         with self.subTest(i=i):
             date = Test.add_year(i, self.fion_date)
             num = Test.num_year(i, self.fion_num)
             self.assertEqual(cal.date_to_dse(date), num)
             self.assertEqual(cal.dse_to_date(num), date)
コード例 #2
0
 def test_dse_convert_is_refective(self):
     for i in range(0, self.iters):
         with self.subTest(i=i):
             date = Test.add_year(i, self.curr_date)
             num = Test.num_year(i, self.curr_num)
             self.assertEqual(cal.date_to_dse(date), num)
             self.assertEqual(cal.dse_to_date(num), date)
コード例 #3
0
 def test_all_for_year_reflective(self):
     for day in range(1, 31):
         for month in range(1, 13):
             with self.subTest(day=day, month=month):
                 date = Test.add_year(
                     0, f'{str(month).zfill(2)}/{str(day).zfill(2)}')
                 self.assertEqual(cal.dse_to_date(cal.date_to_dse(date)),
                                  date)
コード例 #4
0
 def test_nums_for_year_reflective(self):
     for i in range(1, cal.YEAR_LENGTH + 1):
         with self.subTest(i=i):
             self.assertEqual(cal.date_to_dse(cal.dse_to_date(i)), i)
コード例 #5
0
 def test_dse_day_one_not_fest(self):
     self.assertEqual(cal.date_to_dse(Test.add_year(0, self.day_one)),
                      self.day_one_num)