Skip to content

Commit cbaf1ae

Browse files
committed
TST: tests for numpy=True/False differeing in parsing
1 parent 186a4f8 commit cbaf1ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/io/tests/test_json/test_pandas.py

+10
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,16 @@ def test_doc_example(self):
383383
result = read_json(json,dtype={'ints' : np.int64, 'bools' : np.bool_})
384384
assert_frame_equal(result,result)
385385

386+
def test_misc_example(self):
387+
#import pdb; pdb.set_trace()
388+
result = read_json('[{"a": 1, "b": 2}, {"b":2, "a" :1}]',numpy=True)
389+
expected = DataFrame([[1,2],[1,2]],columns=['a','b'])
390+
#assert_frame_equal(result,expected)
391+
392+
result = read_json('[{"a": 1, "b": 2}, {"b":2, "a" :1}]',numpy=False)
393+
expected = DataFrame([[1,2],[1,2]],columns=['a','b'])
394+
assert_frame_equal(result,expected)
395+
386396
@network
387397
@slow
388398
def test_round_trip_exception_(self):

0 commit comments

Comments
 (0)