Exemplo n.º 1
0
    def test_minus1_month(self):
        """ Tests a month value of -1

        This is now valid. It is the last month of the year.
        """
        test_year = HebrewYear(2)
        self.assertEqual(AbsTime(21, 6, 5, 725), test_year.molad(-1))
Exemplo n.º 2
0
    def test_minus1_month_leap(self):
        """ Tests a month value of -1 in a leap year

        This is now valid. It is the last month of the year.
        """
        test_year = HebrewYear(3)
        self.assertEqual(AbsTime(76, 5, 3, 234), test_year.molad(-1))
Exemplo n.º 3
0
    def test_minus13_month_leap(self):
        """ Tests a month value of -13 in a leap year

        This is now valid. For negative months we count back from the end of
        the year.
        """
        test_year = HebrewYear(3)
        self.assertEqual(AbsTime(80, 6, 15, 1027), test_year.molad(-13))
Exemplo n.º 4
0
    def test_minus12_month(self):
        """ Tests a month value of -12

        This is now valid. For negative months we count back from the end of
        the year.
        """
        test_year = HebrewYear(2)
        self.assertEqual(AbsTime(26, 0, 18, 438), test_year.molad(-12))
Exemplo n.º 5
0
 def test_year2_month1(self):
     test_year = HebrewYear(2)
     self.assertEqual(AbsTime(26, 0, 18, 438), test_year.molad(1))
Exemplo n.º 6
0
 def test_year2_month13(self):
     test_year = HebrewYear(2)
     self.assertEqual(AbsTime(21, 6, 5, 725), test_year.molad(13))
Exemplo n.º 7
0
 def test_year2_month8(self):
     test_year = HebrewYear(2)
     self.assertEqual(AbsTime(5, 0, 2, 793), test_year.molad(8))
Exemplo n.º 8
0
 def test_year2_month7(self):
     test_year = HebrewYear(2)
     self.assertEqual(AbsTime(0, 5, 14, 0), test_year.molad(7))
Exemplo n.º 9
0
 def test_month_too_high(self):
     test_year = HebrewYear(2)
     with self.assertRaises(date.MonthNotInRange):
         test_year.molad(14)
Exemplo n.º 10
0
 def test_large_negative_month_leap(self):
     test_year = HebrewYear(3)
     with self.assertRaises(date.MonthNotInRange):
         test_year.molad(-14)
Exemplo n.º 11
0
 def test_year22_month7(self):
     test_year = HebrewYear(22)
     self.assertEqual(AbsTime(1042, 5, 15, 391), test_year.molad(7))
Exemplo n.º 12
0
 def test_year21_month7(self):
     test_year = HebrewYear(21)
     self.assertEqual(AbsTime(992, 1, 6, 595), test_year.molad(7))
Exemplo n.º 13
0
 def test_year20_month7(self):
     test_year = HebrewYear(20)
     self.assertEqual(AbsTime(941, 3, 21, 799), test_year.molad(7))
Exemplo n.º 14
0
 def test_year19_month7(self):
     test_year = HebrewYear(19)
     self.assertEqual(AbsTime(886, 5, 0, 210), test_year.molad(7))
Exemplo n.º 15
0
 def test_year3_month7(self):
     test_year = HebrewYear(3)
     self.assertEqual(AbsTime(51, 2, 22, 876), test_year.molad(7))
Exemplo n.º 16
0
 def test_year2_month6(self):
     test_year = HebrewYear(2)
     self.assertEqual(AbsTime(47, 1, 10, 83), test_year.molad(6))