[ipython + numpy] Some test errors #263

Closed
robsonpeixoto opened this Issue Feb 8, 2011 · 2 comments

Comments

Projects
None yet
2 participants

ipython 0.10.1-1 (archlinux)

$ipython
In [1]: import numpy
In [2]: numpy.test()
Running unit tests for numpy
NumPy version 1.5.1
NumPy is installed in /usr/lib/python2.7/site-packages/numpy
Python version 2.7.1 (r271:86832, Jan 6 2011, 11:45:30) [GCC 4.5.2]
nose version 1.0.0

......

FAIL: test_from_object_array_unicode (test_defchararray.TestBasic)

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/numpy/core/tests/test_defchararray.py", line 24, in test_from_object_array_unicode
self.assertRaises(ValueError, np.char.array, (A,))
AssertionError: ValueError not raised

FAIL: test_from_unicode_array (test_defchararray.TestBasic)

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/numpy/core/tests/test_defchararray.py", line 61, in test_from_unicode_array
self.assertRaises(UnicodeEncodeError, fail)
AssertionError: UnicodeEncodeError not raised

FAIL: Ticket #1240.

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/numpy/core/tests/test_regression.py", line 1186, in test_unicode_to_string_cast
self.assertRaises(UnicodeEncodeError, fail)
AssertionError: UnicodeEncodeError not raised


Ran 2648 tests in 17.326s

FAILED (KNOWNFAIL=4, SKIP=6, failures=3)
Out[2]: <nose.result.TextTestResult run=2648 errors=0 failures=3>

On python run all ok
[robinho@robinho ~]$ python2
Python 2.7.1 (r271:86832, Jan 6 2011, 11:45:30)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import numpy
numpy.test()
Running unit tests for numpy
NumPy version 1.5.1
NumPy is installed in /usr/lib/python2.7/site-packages/numpy
Python version 2.7.1 (r271:86832, Jan 6 2011, 11:45:30) [GCC 4.5.2]
nose version 1.0.0
...
Ran 2648 tests in 17.510s

OK (KNOWNFAIL=4, SKIP=6)
<nose.result.TextTestResult run=2648 errors=0 failures=0>

Contributor

rkern commented Feb 8, 2011

Do you have PyGTK? Are you invoking ipython in such a way that it might be imported, e.g. "ipython -pylab"? Unfortunately, PyGTK changes Python's default text encoding on import. This can prevent certain exceptions that are expected in an unmolested Python interpreter.

I have pygtk but don't using pygtk.
I invoke only the command "ipython" on gnome-terminal with TERM="xterm-256color".

I tested with "ipython -pylab" on gnome-terminal and work very well.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment