diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-06 17:02:13 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-06 19:11:16 -0300 |
commit | fa9a91b59e4dee7e289c9711b86525016491e414 (patch) | |
tree | 4a2b814703cd483278f2f992982ddcf8699ab867 /tests | |
parent | fc08b8878113645692f65d84e488de8288fa09b7 (diff) |
QStrign uses the same hash function of str/unicode objects.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtcore/qstring_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qtcore/qstring_test.py b/tests/qtcore/qstring_test.py index 9bb68a3ed..3f0fb4931 100644 --- a/tests/qtcore/qstring_test.py +++ b/tests/qtcore/qstring_test.py @@ -183,5 +183,10 @@ class QStringImplicitConvertion(unittest.TestCase): obj.setObjectName(QByteArray('foobar')) self.assertEqual(obj.objectName(), QString('foobar')) +class QStringHash(unittest.TestCase): + def testHash(self): + self.assertEqual(hash("key"), hash(QString("key"))) + self.assertEqual(hash(u"aéióu"), hash(QString(u"aéióu"))) + if __name__ == '__main__': unittest.main() |