jeudi 28 mai 2015

What is wrong with my test?

I'm running through a test suite and it seems that I'm getting a local error about my locale when tested if "Förberedande" is the same:

#711      test_personal_menu.test_courses_menu ... > /usr/lib/python2.7/unittest/case.py(412)fail()
-> raise self.failureException(msg)
(Pdb) u
> /usr/lib/python2.7/unittest/case.py(726)assertSequenceEqual()
-> self.fail(msg)
(Pdb) u
> /usr/lib/python2.7/unittest/case.py(744)assertListEqual()
-> self.assertSequenceEqual(list1, list2, msg, seq_type=list)
(Pdb) list1
[(u'F\xf6rberedande kurs i matematik (SF1624)', u'http://ift.tt/1GFBieT')]
(Pdb) list2
[(u'F\u0e23\u0e16rberedande kurs i matematik (SF1624)', u'http://ift.tt/1GFBieT')]
(Pdb) 

It seems to have something to do with how python handles unicode. Can you tell me what I can do about it? The problem is local for my one Ubuntu dev machine, on my other machine the test is working and I can't tell what differs. I opened the language settings dialog on Ubuntu and tried to change so that Sedish language was prioritized but that didn't help.

Aucun commentaire:

Enregistrer un commentaire