Beispiel #1
0
 def test_sunset_sunrise(self):
     brecon = setup()
     now = datetime(2016,4,6,12,10,0)
     sunset = datetime(2016,4,6,18,57)
     sunrise = datetime(2016,4,6,5,37)
     calc_sunrise, calc_sunset = rise_set(brecon, now)
     assert np.abs(sunset - calc_sunset) < timedelta(seconds=600)
     assert np.abs(sunrise - calc_sunrise) < timedelta(seconds=600)
Beispiel #2
0
 def test_sunset_sunrise(self):
     brecon = setup()
     now = datetime(2016, 4, 6, 12, 10, 0)
     sunset = datetime(2016, 4, 6, 18, 57)
     sunrise = datetime(2016, 4, 6, 5, 37)
     calc_sunrise, calc_sunset = rise_set(brecon, now)
     assert np.abs(sunset - calc_sunset) < timedelta(seconds=600)
     assert np.abs(sunrise - calc_sunrise) < timedelta(seconds=600)
Beispiel #3
0
 def test_twilight_exposur2(self):
     brecon = setup()
     now = datetime(2016,4,6,19,20)
     exposure = set_exposure(brecon, now)
     assert exposure == NIGHT_EXP/10.
Beispiel #4
0
 def test_twilight_exposure(self):
     brecon = setup()
     now = datetime(2016,4,6,19,0)
     exposure = set_exposure(brecon, now)
     assert exposure == DAY_EXP
Beispiel #5
0
 def test_twilight_exposur2(self):
     brecon = setup()
     now = datetime(2016, 4, 6, 19, 20)
     exposure = set_exposure(brecon, now)
     assert exposure == NIGHT_EXP / 10.
Beispiel #6
0
 def test_twilight_exposure(self):
     brecon = setup()
     now = datetime(2016, 4, 6, 19, 0)
     exposure = set_exposure(brecon, now)
     assert exposure == DAY_EXP