You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
Hi,
I was wondering if the test inputs in the validators tests should be given as unicode or python string. It seems to me that at the moment the validation is done, the string is already coded in unicode. However the django tests use a python string as test input (https://github.com/django/django/blob/master/tests/validators/tests.py).
Could someone help me to clarify this? (chances are I don't dig encoding enough)
Thanks,
Alois
Shai Berger
unread,
Apr 2, 2014, 8:46:59 AM4/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
On Wednesday 02 April 2014 13:43:23 alois.g...@gmail.com wrote:
> Hi,
>
> I was wondering if the test inputs in the validators tests should be given
> as unicode or python string. It seems to me that at the moment the
> validation is done, the string is already coded in unicode. However the
> django tests use a python string as test input
> (https://github.com/django/django/blob/master/tests/validators/tests.py).
>
They are "text" (=unicode) objects, not "bytes".
Notice line 2 in that file:
from __future__ import unicode_literals
You may want to look up the whole issue of strings, bytes and unicode in
Python2 and Python3.