8000 Backport459 by certik · Pull Request #2842 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Backport459 #2842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 17, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
TST: Change expected output for Python 3.
  • Loading branch information
jseabold authored and certik committed Dec 16, 2012
commit 049ae4db5d21481b01e3b2b71602013c55656273
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