def test_date_to_string(): date = Date(2018, 1, 1) date.to_string() date.to_string(Date.Format.Standard) date.to_string(Date.Format.STK)
def test_date_time_constructors(): # Construction with 6 integers in input date_time: DateTime = DateTime(2020, 1, 1, 0, 0, 0, 0, 0, 0) assert date_time is not None assert isinstance(date_time, DateTime) assert date_time.is_defined() # Construction with 9 integers in input date_time: DateTime = DateTime(2020, 1, 1, 0, 0, 0) assert date_time is not None assert isinstance(date_time, DateTime) assert date_time.is_defined() # Construction with Date and Time objects date_time: DateTime = DateTime(Date(2020, 1, 1), Time(0, 0, 0)) assert date_time is not None assert isinstance(date_time, DateTime) assert date_time.is_defined()
def test_date_set_day(): date = Date(2018, 1, 1) date.set_day(2)
def test_date_set_month(): date = Date(2018, 1, 1) date.set_month(2)
def test_date_set_year(): date = Date(2018, 1, 1) date.set_year(2019)
def test_date_constructors(): assert Date(2018, 1, 1) is not None
def test_date_get_month(): date = Date(2018, 1, 1) assert date.get_month() is not None
def test_date_is_defined(): date = Date(2018, 1, 1) assert date.is_defined() is not None
def test_date_operators(): date = Date(2018, 1, 1) assert (date == date) is not None assert (date != date) is not None
def test_date_time_get_date(): date_time = DateTime(2018, 1, 1, 0, 0, 0, 0, 0, 0) assert date_time.get_date() is not None assert date_time.get_date() == Date(2018, 1, 1)
def test_date_time_constructors (): assert DateTime(2018, 1, 1, 0, 0, 0, 0, 0, 0) is not None assert DateTime(2018, 1, 1, 0, 0, 0) is not None assert DateTime(Date(2018, 1, 1), Time(0, 0, 0)) is not None