Skip to content

Commit

Permalink
TST: Change expected output for Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseabold committed Sep 26, 2012
1 parent 8e0a542 commit 0f5bbfa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion numpy/core/tests/test_arrayprint.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import numpy as np
from numpy.testing import *
Expand Down Expand Up @@ -148,8 +150,13 @@ def test_formatter_reset(self):
assert_equal(repr(x), "array([ 0., 1., 2.])")

def test_unicode_object_array():
import sys
if sys.version_info[0] >= 3:
expected = "array(['é'], dtype=object)"
else:
expected = "array([u'\\xe9'], dtype=object)"
x = np.array([u'\xe9'], dtype=object)
assert_equal(repr(x), "array([u'\\xe9'], dtype=object)")
assert_equal(repr(x), expected)



Expand Down

0 comments on commit 0f5bbfa

Please sign in to comment.