I was looking at this too. The root cause of the test failure is that
unicode_translate() calls PyDict_Copy() on its argument dict, and then
modifies the copy to add extra keys. This seems awfully expensive.
Isn't there another way? (I'm imagining that often the dict is rather
large and the string rather short...)

--Guido

2007/10/24, georg.brandl <[email protected]>:
> Author: georg.brandl
> Date: Wed Oct 24 23:25:34 2007
> New Revision: 58650
>
> Modified:
>    python/branches/py3k/Lib/test/test_codeccallbacks.py
> Log:
> Remove a test case which is no longer valid.
>
>
> Modified: python/branches/py3k/Lib/test/test_codeccallbacks.py
> ==============================================================================
> --- python/branches/py3k/Lib/test/test_codeccallbacks.py        (original)
> +++ python/branches/py3k/Lib/test/test_codeccallbacks.py        Wed Oct 24 
> 23:25:34 2007
> @@ -792,7 +792,7 @@
>          class D(dict):
>              def __getitem__(self, key):
>                  raise ValueError
> -        self.assertRaises(ValueError, "\xff".translate, D())
> +        #self.assertRaises(ValueError, "\xff".translate, D())
>          self.assertRaises(TypeError, "\xff".translate, {0xff: 
> sys.maxunicode+1})
>          self.assertRaises(TypeError, "\xff".translate, {0xff: ()})
>
> _______________________________________________
> Python-3000-checkins mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-3000-checkins
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to