[IPython-dev] Unicode in tests

Robert Kern robert.kern at gmail.com
Tue Feb 1 14:28:11 EST 2011


On 2/1/11 4:02 AM, Thomas Kluyver wrote:
> While testing the use of non-ascii characters in 0.11 recently, I found that
> there are things which will fail while actually using ipython, but cannot be
> made to fail in the test suite. Investigating, I found that for the test suite,
> the default encoding is somehow set to utf-8 (ascii is the default default
> encoding for Python 2). I don't know quite what's doing this, but it did the
> same with my system version of nose (0.11.1 in Ubuntu) and with nose 1.0.0
> installed in the virtualenv.
>
> At present, I've worked round that by adding an entirely separate
> unicode_tests.py file, which has to be run separately from the main iptest test
> suite.
>
> https://github.com/ipython/ipython/pull/252
>
> Does anyone have any insight on whether this is something our test suite is
> doing, something nose is doing, something that can be fixed, or something that
> we have to work around?

There is no code in IPython or nose itself that does this. Can you make sure 
that nose is not picking up any extra plugins (print out sys.modules inside of a 
test suite)?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the IPython-dev mailing list