add new QDatetime init function with 6 arguments

Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
linjunhalida 2011-01-04 23:43:56 +08:00 committed by Hugo Parente Lima
commit 32681f7b70
2 changed files with 18 additions and 0 deletions

View file

@ -44,7 +44,18 @@ class TestDateTimeConversions (unittest.TestCase):
self.assertEqual(dateTime, other.toPython())
# with 6 arguments
other = QDateTime(2010, 04, 23, 11, 14, 01)
otherDate = other.date()
self.assertEqual(2010, otherDate.year())
self.assertEqual(4, otherDate.month())
self.assertEqual(23, otherDate.day())
otherTime = other.time()
self.assertEqual(11, otherTime.hour())
self.assertEqual(14, otherTime.minute())
self.assertEqual(1, otherTime.second())
if __name__ == '__main__':
unittest.main()