@@ -336,7 +336,7 @@ def test_to_json_append_mode(mode_):
336
336
df .to_json (mode = mode_ , lines = False , orient = "records" )
337
337
338
338
339
- def to_json_append_output_consistent_columns ():
339
+ def test_to_json_append_output_consistent_columns ():
340
340
# GH 35849
341
341
# Testing that resulting output reads in as expected.
342
342
# Testing same columns, new rows
@@ -354,7 +354,7 @@ def to_json_append_output_consistent_columns():
354
354
tm .assert_frame_equal (result , expected )
355
355
356
356
357
- def to_json_append_output_inconsistent_columns ():
357
+ def test_to_json_append_output_inconsistent_columns ():
358
358
# GH 35849
359
359
# Testing that resulting output reads in as expected.
360
360
# Testing one new column, one old column, new rows
@@ -378,7 +378,7 @@ def to_json_append_output_inconsistent_columns():
378
378
tm .assert_frame_equal (result , expected )
379
379
380
380
381
- def to_json_append_output_different_columns ():
381
+ def test_to_json_append_output_different_columns ():
382
382
# GH 35849
383
383
# Testing that resulting output reads in as expected.
384
384
# Testing same, differing and new columns
@@ -394,7 +394,7 @@ def to_json_append_output_different_columns():
394
394
"col3" : [None , None , None , None , "!" , "#" , None , None ],
395
395
"col4" : [None , None , None , None , None , None , True , False ],
396
396
}
397
- )
397
+ ). astype ({ "col4" : "float" })
398
398
with tm .ensure_clean ("test.json" ) as path :
399
399
# Save dataframes to the same file
400
400
df1 .to_json (path , mode = "a" , lines = True , orient = "records" )
@@ -407,7 +407,7 @@ def to_json_append_output_different_columns():
407
407
tm .assert_frame_equal (result , expected )
408
408
409
409
410
- def to_json_append_output_different_columns_reordered ():
410
+ def test_to_json_append_output_different_columns_reordered ():
411
411
# GH 35849
412
412
# Testing that resulting output reads in as expected.
413
413
# Testing specific result column order.
@@ -424,7 +424,7 @@ def to_json_append_output_different_columns_reordered():
424
424
"col3" : [None , None , "!" , "#" , None , None , None , None ],
425
425
"col1" : [None , None , None , None , 3 , 4 , 1 , 2 ],
426
426
}
427
- )
427
+ ). astype ({ "col4" : "float" })
428
428
with tm .ensure_clean ("test.json" ) as path :
429
429
# Save dataframes to the same file
430
430
df4 .to_json (path , mode = "a" , lines = True , orient = "records" )
0 commit comments