Skip to content

FAIL: test_to_string_repr_unicode #2666

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

Closed
Honghe opened this issue Jan 9, 2013 · 6 comments · Fixed by #2677
Closed

FAIL: test_to_string_repr_unicode #2666

Honghe opened this issue Jan 9, 2013 · 6 comments · Fixed by #2677

Comments

@Honghe
Copy link

Honghe commented Jan 9, 2013

env:
windows 7 32bit english
python 2.7.3

when I run nose test:

nosetests pandas

issue:
FAIL: test_to_string_repr_unicode (pandas.tests.test_format.TestDataFrameFormatting)
Traceback (most recent call last):
File "D:\Python27\lib\site-packages\pandas\tests\test_format.py", line 141, in
test_to_string_repr_unicode
self.assert_(len(line) == line_len)
AssertionError: False is not true

how to do?

@ghost
Copy link

ghost commented Jan 9, 2013

what does the following produce on your system?

In [8]: import locale
   ...: import sys
   ...: import pandas as pd
   ...: print(pd.__version__)
   ...: print( sys.stdout.encoding)
   ...: print( sys.stdin.encoding)
   ...: print(locale.getpreferredencoding())
   ...: print(sys.getdefaultencoding())
   ...: print(pd.options.display.encoding)

@Honghe
Copy link
Author

Honghe commented Jan 10, 2013

In [1]: import locale, sys    

In [2]: import pandas as pd

In [3]: print pd.__version__
0.10.0

In [4]: print sys.stdout.encoding
cp936

In [5]: print sys.std
sys.stderr sys.stdin  sys.stdout

In [5]: print sys.stdin.encoding
cp936

In [6]: print local
Local\ Settings locale          locals

In [6]: print locale.get
locale.getdefaultlocale     locale.getpreferredencoding
locale.getlocale

In [6]: print locale.getpreferredencoding()
cp936

In [7]: print sys.getdefaultencoding()
ascii

In [8]: print pd.options.display.encoding
cp936

@ghost
Copy link

ghost commented Jan 10, 2013

@Honghe , can you confirm that #2677 fixes the issue for you?

Need to add a travis build under an alternate encoding.

ghost pushed a commit that referenced this issue Jan 10, 2013
zh_CN.GB18030 (simplified chinese, superceding cp936) should
be exotic enough to bring out issues of this sort. #2666
@ghost
Copy link

ghost commented Jan 10, 2013

Should be fixed now. closing.

@ghost ghost closed this as completed Jan 10, 2013
@Honghe
Copy link
Author

Honghe commented Jan 11, 2013

@y-p sorry for response late, I‘m in GMT+8 ;)
Cause in win32, will be waiting for binary installer

@Honghe
Copy link
Author

Honghe commented Jan 11, 2013

@y-p thanks.

On Thu, Jan 10, 2013 at 10:50 PM, y-p [email protected] wrote:

@Honghe https://github.com/Honghe , can you confirm that #2677https://github.com/pydata/pandas/issues/2677fixes the issue for you?

Need to add a travis build under an alternate encoding.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2666#issuecomment-12099725.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant