Johan Harjano ran into an interesting problem when trying to run the
Django test suite under Python 3.1.
Django has doctests of the form
>>> a6.headline
u'Default headline'
Even when converting the doctest with 2to3, the expected output is
unmodified. However, in 3.x, the expected output will ch
On Mar 05, 2010, at 05:11 AM, Martin v. Löwis wrote:
>Johan Harjano ran into an interesting problem when trying to run the
>Django test suite under Python 3.1.
>
>Django has doctests of the form
>
a6.headline
>u'Default headline'
>
>Even when converting the doctest with 2to3, the expected out
On Mar 4, 2010, at 11:30 PM, Barry Warsaw wrote:
> If you really want to test that it's a unicode, shouldn't you actually test
> its type? (I'm not sure what would happen with that under 2to3.)
Presumably 2to3 will be smart enough to translate 'unicode' to 'str' and
'bytes' to... 'bytes'. Jus
Glyph Lefkowitz wrote:
>
> On Mar 4, 2010, at 11:30 PM, Barry Warsaw wrote:
>
>> If you really want to test that it's a unicode, shouldn't you actually
>> test
>> its type? (I'm not sure what would happen with that under 2to3.)
>
> Presumably 2to3 will be smart enough to translate 'unicode' to
"Martin v. Löwis" wrote:
[...]
> Any proposal appreciated.
I propose screaming “help me, I have written a test suite using nothing
but string matching assertions, what is wrong with me?!”
-Andrew.
___
Python-Dev mailing list
Python-Dev@python.org
http:
Le Thu, 4 Mar 2010 23:30:12 -0500,
Barry Warsaw a écrit :
>
> If you really want to test that it's a unicode, shouldn't you
> actually test its type? (I'm not sure what would happen with that
> under 2to3.) Besides, the type of the string is very rarely
> important, so I think the u-prefix and
On 05/03/2010 15:56, Antoine Pitrou wrote:
Le Thu, 4 Mar 2010 23:30:12 -0500,
Barry Warsaw a écrit :
If you really want to test that it's a unicode, shouldn't you
actually test its type? (I'm not sure what would happen with that
under 2to3.) Besides, the type of the string is very rarely
On Mar 05, 2010, at 10:56 AM, Antoine Pitrou wrote:
>String type is actually very important, if you don't want your
>application/library to fail in the face of non-ASCII data.
>
>That's why we did all this thing in py3k, after all :)
That's not actually what I mean. I meant that in doctests, you
On 3/4/2010 11:11 PM, "Martin v. Löwis" wrote:
Johan Harjano ran into an interesting problem when trying to run the
Django test suite under Python 3.1.
Django has doctests of the form
a6.headline
u'Default headline'
Even when converting the doctest with 2to3, the expected output is
unmodifie
Andrew Bennetts wrote:
> "Martin v. Löwis" wrote:
> [...]
>> Any proposal appreciated.
>
> I propose screaming “help me, I have written a test suite using nothing
> but string matching assertions, what is wrong with me?!”
Thanks a lot.
Regards,
Martin
On Thu, Mar 4, 2010 at 8:11 PM, "Martin v. Löwis" wrote:
> Johan Harjano ran into an interesting problem when trying to run the
> Django test suite under Python 3.1.
>
> Django has doctests of the form
>
a6.headline
> u'Default headline'
>
> Even when converting the doctest with 2to3, the exp
> The issue shows (yet again) a general problem with doctests being
> overspecified -- the test shouldn't care that the output starts with
> 'u', it should only care that the value is unicode, but there's no
> easy way to express this in doctests. But since these doctests exist I
> suggest that the
Am 05.03.2010 20:37, schrieb Terry Reedy:
> On 3/4/2010 11:11 PM, "Martin v. Löwis" wrote:
>> Johan Harjano ran into an interesting problem when trying to run the
>> Django test suite under Python 3.1.
>>
>> Django has doctests of the form
>>
> a6.headline
>> u'Default headline'
>>
>> Even when
Martin v. Löwis wrote:
Johan Harjano ran into an interesting problem when trying to run the
Django test suite under Python 3.1.
Django has doctests of the form
>>> a6.headline
u'Default headline'
Even when converting the doctest with 2to3, the expected output is
unmodified. However, in 3.x, th
14 matches
Mail list logo