QStrign uses the same hash function of str/unicode objects.

This commit is contained in:
Hugo Parente Lima 2010-04-06 17:02:13 -03:00
commit fa9a91b59e
3 changed files with 14 additions and 1 deletions

View file

@ -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()