aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-24 15:20:53 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:49 -0300
commita51b488ca06d412c7071f4f44e556d45b022ec81 (patch)
tree6803ab812c3daf5572315fd011349d6c4bddee0f /tests
parentb66595efa544b2675fef7ec2c6832dba5d8c1177 (diff)
Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj types?) returns True for empty instance; probably should be False"
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/qdate_test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/QtCore/qdate_test.py b/tests/QtCore/qdate_test.py
index 49234486f..e1386ab2b 100644
--- a/tests/QtCore/qdate_test.py
+++ b/tests/QtCore/qdate_test.py
@@ -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()