def test_sunrise_in_Lima_March_3_1996(self): day = qc.dayinyear(1996, 3, 3) a, e, rta, hra, sid, dec = qc.sunangle(1996, day, 6, 11, 0, 5, 0, -12.0433, -77.0283) self.assertAlmostEqual(0, e, delta=1.5)
def test_sunset_in_Zanzibar_City_Jan_31_1995(self): day = qc.dayinyear(1995, 1, 31) a, e, rta, hra, sid, dec = qc.sunangle(1995, day, 18, 17, 0, 21.38, 0, -6.1658, 39.1992) self.assertAlmostEqual(0, e, delta=1.5)
def test_sunrise_summer_solstice_2016_exeter(self): day = qc.dayinyear(2016, 6, 20) a, e, rta, hra, sid, dec = qc.sunangle(2016, day, 5, 1, 0, 0, 1, 50.7365, -3.5344) self.assertAlmostEqual(0, e, delta=1.5)
def test_looking_through_window(self): """test devised by looking through the window at the sun resting on the horizon at 07:45 15 October 2015""" day = qc.dayinyear(2015, 10, 15) a, e, rta, hra, sid, dec = qc.sunangle(2015, day, 7, 40, 0, 0, 1, 50.7365, -3.5344) self.assertAlmostEqual(0, e, delta=5.00)
def test_dec31_leapyear(self): self.assertEqual(366, qc.dayinyear(1984, 12, 31))
def test_dec31(self): self.assertEqual(365, qc.dayinyear(1999, 12, 31))
def test_jan1(self): self.assertEqual(1, qc.dayinyear(1999, 1, 1))