Coverage for tests/test_utils.py : 39%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Test that the season utils work as intended """ night = 365.25 * 3.5 plain = season_calc(night) assert(plain == 3)
mod2 = season_calc(night, modulo=2) assert(mod2 == 1)
mod3 = season_calc(night, modulo=3) assert(mod3 == 0)
mod3 = season_calc(night, modulo=3, max_season=2) assert(mod3 == -1)
mod3 = season_calc(night, modulo=3, max_season=2, offset=-365.25*2) assert(mod3 == 1)
mod3 = season_calc(night, modulo=3, max_season=2, offset=-365.25*10) assert(mod3 == -1)
mod3 = season_calc(night, modulo=3, offset=-365.25*10) assert(mod3 == -1)
lsst.utils.tests.init()
lsst.utils.tests.init() unittest.main() |