# Copyright 2024 Zoé Cassiopée Gauthier. # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. import datetime as dt from phase_of_the_moon.main import phase_of_the_moon, NEW_MOON, FULL_MOON def test_new_moon(): local_time = dt.datetime(1996, 9, 13) assert phase_of_the_moon(local_time) == NEW_MOON def test_full_moon(): local_time = dt.datetime(1998, 3, 13) assert phase_of_the_moon(local_time) == FULL_MOON def test_any_other_moon_phase(): local_time = dt.datetime(2000, 1, 1) moon_phase = phase_of_the_moon(local_time) assert moon_phase != FULL_MOON assert moon_phase != NEW_MOON