Re: unicode and manage.py test

2009-10-02 Thread Karen Tracey
On Thu, Oct 1, 2009 at 8:11 AM, gentlestone wrote: > > [snip] > My question is. Can anybody explain, what does it mean? How should I > rewrite my doctests in above way? How this piece of code should be? > > def slugify(name): >u""" >>>> slugify(u'Žabovitá zmiešaná kaša s.r.o') >u'zabo

Re: unicode and manage.py test

2009-10-02 Thread gentlestone
I changed the _doctest.py line 2180 to: if failures: raise self.failureException(self.format_failure (new.getvalue()).encode('UTF-8')) Whitout this bug correction, the doctests with non ascii characters doesn't work. So your >It says, instead write u'blah blah', which you ar

Re: unicode and manage.py test

2009-10-02 Thread nausikaa
Hi I think you're already have it right. It means do not write "print ..some stuff.." in your docstring. It says, instead write u'blah blah', which you are doing already. My question is: Isn't it expected that the doctest fails if you change a letter because then the output will disagree with yo

unicode and manage.py test

2009-10-01 Thread gentlestone
I wrote a piece of code for correct slugification: _MAP = { # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C', u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E', u'Ì': 'I', u'Í': 'I', u'Î': 'I', u'Ï': 'I', u'Ð': 'D', u'Ñ': 'N', u'Ò': 'O', u'Ó'