def test_mayan_monthcalendar(self): calendar = mayan.haab_monthcalendar(13, 0, 2, 11, 13) row = calendar[0] square = row[-1] assert isinstance(row, list) assert isinstance(square, tuple) assert row[7][0] == 1 assert mayan.to_jd(*calendar[-1][-1][-1]) == 19 + mayan.to_jd(13, 0, 2, 11, 13) self.assertEqual(square, (6, (13, "Etz'nab'"), (13, 0, 2, 11, 18)))
def test_mayan_count(self): assert mayan.to_jd(13, 0, 0, 0, 0) == 2456282.5 assert mayan.from_gregorian(2012, 12, 21) == (13, 0, 0, 0, 0) assert mayan.to_gregorian(13, 0, 0, 0, 0) == (2012, 12, 21) assert mayan.from_jd(self.c) == (11, 13, 12, 4, 13)
def test_mayan_reflexive(self): assert self.jd == mayan.to_jd(*mayan.from_jd(self.jd)) self.reflexive(mayan)
def test_mayan_reflexive(self): assert self.jd == mayan.to_jd(*mayan.from_jd(self.jd)) self.reflexive(mayan.from_jd, mayan.to_jd)