There is some weirdness about comparing QStrings and unicodes:
>>> u'a' == QtCore.QString(u'a')
True
>>> u'á' == QtCore.QString(u'á')
__main__:1: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
False
>>> u'á' == unicode(QtCore.QString(u'á'))
True
Therefore, whenever we compare unicode to strings we get from Qt (like using widget.text() or whatever), we need to manually convert the QString to unicode prior to comparison.
These 9 tests fail on spanish because they are the 9 strings we are comparing that have non-ascii characters in them. In other locales other tests may fail.
There is some weirdness about comparing QStrings and unicodes:
>>> u'a' == QtCore. QString( u'a') QString( u'á') QtCore. QString( u'á'))
True
>>> u'á' == QtCore.
__main__:1: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
False
>>> u'á' == unicode(
True
Therefore, whenever we compare unicode to strings we get from Qt (like using widget.text() or whatever), we need to manually convert the QString to unicode prior to comparison.
These 9 tests fail on spanish because they are the 9 strings we are comparing that have non-ascii characters in them. In other locales other tests may fail.