QStrign uses the same hash function of str/unicode objects.
This commit is contained in:
parent
fc08b88781
commit
fa9a91b59e
3 changed files with 14 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue