Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj types?) returns True for empty instance; probably should be False"
This commit is contained in:
parent
9a4c439d7f
commit
286f9c6d09
2 changed files with 6 additions and 1 deletions
|
|
@ -23,6 +23,11 @@ class TestQDate (unittest.TestCase):
|
|||
self.assertEqual(week, 52)
|
||||
self.assertEqual(yearNumber, 1999)
|
||||
|
||||
def testBooleanCast(self):
|
||||
today = QDate.currentDate()
|
||||
self.assertTrue(today)
|
||||
nodate = QDate()
|
||||
self.assertFalse(nodate)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue