Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb3e8e2

Browse files
author
y-p
committed
TST: add test_pprint_thing()
1 parent d859d15 commit fb3e8e2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pandas/tests/test_common.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,21 @@ def test_console_encode():
193193
expected = u"\u05d0".encode('utf-8')
194194
assert (result == expected)
195195

196+
def test_pprint_thing():
197+
if py3compat.PY3:
198+
raise nose.SkipTest
199+
200+
pp_t=com.pprint_thing
201+
202+
assert(pp_t('a')==u'a')
203+
assert(pp_t(u'a')==u'a')
204+
assert(pp_t(None)=='')
205+
assert(pp_t(u'\u05d0')==u'\u05d0')
206+
assert(pp_t((u'\u05d0',u'\u05d1'))==u'(\u05d0, \u05d1)')
207+
assert(pp_t((u'\u05d0',(u'\u05d1',u'\u05d2')))==
208+
u'(\u05d0, (\u05d1, \u05d2))')
209+
assert(pp_t(('foo',u'\u05d0',(u'\u05d0',u'\u05d0')))==
210+
u'(foo, \u05d0, (\u05d0, \u05d0))')
196211

197212
class TestTake(unittest.TestCase):
198213

0 commit comments

Comments
 (0)