Exemplo n.º 1
0
    def test_lib_calendar_CalendarSetDate(self):
        pnl = wx.Panel(self.frame)

        acal = cal.Calendar(pnl)

        acal.SetYear(2014)
        acal.SetMonth(1)
        acal.SetDayValue(31)
Exemplo n.º 2
0
    def test_lib_calendar_CalendarMoveDate(self):
        pnl = wx.Panel(self.frame)

        acal = cal.Calendar(pnl)
        acal.SetDate(31, 1, 2020)
        self.assertEqual(acal.IncMonth(), (29, 2, 2020))
        self.assertEqual(acal.IncYear(), (28, 2, 2021))
        self.assertEqual(acal.DecMonth(), (28, 1, 2021))
        self.assertEqual(acal.DecYear(), (28, 1, 2020))
Exemplo n.º 3
0
    def test_lib_calendar_CalendarSetDate(self):
        pnl = wx.Panel(self.frame)

        acal = cal.Calendar(pnl)

        acal.SetYear(2014)
        acal.SetMonth(1)
        acal.SetDayValue(31)
        self.assertEqual(acal.GetDate(), (31, 1, 2014))
        self.assertEqual(acal.SetDate(29, 2, 2020), (29, 2, 2020))
        self.assertEqual(acal.SetDate(29, 2, 2019), (28, 2, 2019))
        with self.assertRaises(ValueError):
            acal.SetDate(29, 13, 2019)
Exemplo n.º 4
0
    def test_lib_calendar_CalendarCtor(self):
        pnl = wx.Panel(self.frame)

        acal = cal.Calendar(pnl)