diff --git a/unittests/test_lib_calendar.py b/unittests/test_lib_calendar.py new file mode 100644 index 00000000..e99ee343 --- /dev/null +++ b/unittests/test_lib_calendar.py @@ -0,0 +1,31 @@ +import imp_unittest, unittest +import wtc +import wx +import wx.lib.calendar as cal + +#--------------------------------------------------------------------------- + +class lib_calendar_Tests(wtc.WidgetTestCase): + + def test_lib_calendar_CalendarCtor(self): + pnl = wx.Panel(self.frame) + + acal = cal.Calendar(pnl) + + def test_lib_calendar_CalendarSetDate(self): + pnl = wx.Panel(self.frame) + + acal = cal.Calendar(pnl) + + acal.SetYear(2014) + acal.SetMonth(1) + acal.SetDayValue(31) + + def test_lib_calendar_CalenDlgCtor(self): + dlg = cal.CalenDlg(self.frame, month=1, day=11, year=2014) + dlg.Destroy() + +#--------------------------------------------------------------------------- + +if __name__ == '__main__': + unittest.main() diff --git a/unittests/test_cdate.py b/unittests/test_lib_cdate.py similarity index 74% rename from unittests/test_cdate.py rename to unittests/test_lib_cdate.py index caa071a3..52a778e4 100644 --- a/unittests/test_cdate.py +++ b/unittests/test_lib_cdate.py @@ -4,30 +4,30 @@ import wx.lib.CDate as cdate import wx.lib.six as six -class CdateTests(wtc.WidgetTestCase): +class lib_cdate_Tests(wtc.WidgetTestCase): - def test_CdateDateCtor(self): + def test_lib_cdate_DateCtor(self): cdate.Date(2014, 1, 31) - def test_CdateNowCtor(self): + def test_lib_cdate_NowCtor(self): cdate.now() - def test_CdateIsleapTrue(self): + def test_lib_cdate_IsleapTrue(self): l1 = cdate.isleap(2012) self.assertTrue(l1, msg='Expected a leap year') - def test_CdateIsleapFalse(self): + def test_lib_cdate_IsleapFalse(self): l2 = cdate.isleap(2013) self.assertFalse(l2, msg='Expected a non leap year') - def test_CdateJulianday(self): + def test_lib_cdate_Julianday(self): bd = cdate.Date(2014, 1, 10) jd = cdate.julianDay(bd.year, bd.month, bd.day) self.assertTrue(jd == bd.julian, msg='Expected them to be equal') - def test_CdateDayofweek(self): + def test_lib_cdate_Dayofweek(self): jd = cdate.julianDay(2014, 1, 10) dw = cdate.dayOfWeek(jd) self.assertTrue(dw == 4, msg='Expected "4" assuming Monday is 1, got %s' % dw)