@@ -1270,21 +1270,12 @@ def assert_frame_equal(left, right, check_dtype=True,
1270
1270
assertIsInstance (left , type (right ))
1271
1271
# assert_class_equal(left, right, obj=obj)
1272
1272
1273
- # shape comparison (row)
1274
- if left .shape [ 0 ] != right .shape [ 0 ] :
1273
+ # shape comparison
1274
+ if left .shape != right .shape :
1275
1275
raise_assert_detail (obj ,
1276
- 'DataFrame shape (number of rows) are different' ,
1277
- '{0}, {1}' .format (left .shape [0 ], left .index ),
1278
- '{0}, {1}' .format (right .shape [0 ], right .index ))
1279
- # shape comparison (columns)
1280
- if left .shape [1 ] != right .shape [1 ]:
1281
- raise_assert_detail (obj ,
1282
- 'DataFrame shape (number of columns) '
1283
- 'are different' ,
1284
- '{0}, {1}' .format (left .shape [1 ],
1285
- left .columns ),
1286
- '{0}, {1}' .format (right .shape [1 ],
1287
- right .columns ))
1276
+ 'DataFrame shape mismatch' ,
1277
+ '({0}, {1})' .format (* left .shape ),
1278
+ '({0}, {1})' .format (* right .shape ))
1288
1279
1289
1280
if check_like :
1290
1281
left , right = left .reindex_like (right ), right
0 commit comments