@@ -163,14 +163,14 @@ def test_column_type_of_bytestring_columns():
163163
164164 result = _column_type ([b"foo" , b"bar" ])
165165 expected = bytes
166- assert_equal (result , expected )
166+ assert_equal (expected , result )
167167
168168
169169def test_numeric_column_headers ():
170170 "Regression: numbers as column headers (issue #22)"
171171 result = tabulate ([[1 ], [2 ]], [42 ])
172172 expected = " 42\n ----\n 1\n 2"
173- assert_equal (result , expected )
173+ assert_equal (expected , result )
174174
175175 lod = [{p : i for p in range (5 )} for i in range (5 )]
176176 result = tabulate (lod , "keys" )
@@ -185,7 +185,7 @@ def test_numeric_column_headers():
185185 " 4 4 4 4 4" ,
186186 ]
187187 )
188- assert_equal (result , expected )
188+ assert_equal (expected , result )
189189
190190
191191def test_88_256_ANSI_color_codes ():
@@ -226,14 +226,14 @@ def test_latex_escape_special_chars():
226226 ]
227227 )
228228 result = tabulate ([["&%^_$#{}<>~" ]], ["foo^bar" ], tablefmt = "latex" )
229- assert_equal (result , expected )
229+ assert_equal (expected , result )
230230
231231
232232def test_isconvertible_on_set_values ():
233233 "Regression: don't fail with TypeError on set values (issue #35)"
234234 expected = "\n " .join (["a b" , "--- -----" , "Foo set()" ])
235235 result = tabulate ([["Foo" , set ()]], headers = ["a" , "b" ])
236- assert_equal (result , expected )
236+ assert_equal (expected , result )
237237
238238
239239def test_ansi_color_for_decimal_numbers ():
@@ -243,7 +243,7 @@ def test_ansi_color_for_decimal_numbers():
243243 ["------- ---" , "Magenta \x1b [95m1.1\x1b [0m" , "------- ---" ]
244244 )
245245 result = tabulate (table )
246- assert_equal (result , expected )
246+ assert_equal (expected , result )
247247
248248
249249def test_alignment_of_decimal_numbers_with_ansi_color ():
@@ -253,7 +253,7 @@ def test_alignment_of_decimal_numbers_with_ansi_color():
253253 table = [[v1 ], [v2 ]]
254254 expected = "\n " .join (["\x1b [95m12.34\x1b [0m" , " \x1b [95m1.23456\x1b [0m" ])
255255 result = tabulate (table , tablefmt = "plain" )
256- assert_equal (result , expected )
256+ assert_equal (expected , result )
257257
258258
259259def test_alignment_of_decimal_numbers_with_commas ():
@@ -266,15 +266,15 @@ def test_alignment_of_decimal_numbers_with_commas():
266266 # '+------+-----------+', '| c1r2 | 105.00 |',
267267 # '+------+-----------+']
268268 # )
269- # assert_equal(result, expected )
269+ # assert_equal(expected, result )
270270
271271
272272def test_long_integers ():
273273 "Regression: long integers should be printed as integers (issue #48)"
274274 table = [[18446744073709551614 ]]
275275 result = tabulate (table , tablefmt = "plain" )
276276 expected = "18446744073709551614"
277- assert_equal (result , expected )
277+ assert_equal (expected , result )
278278
279279
280280def test_colorclass_colors ():
@@ -285,7 +285,7 @@ def test_colorclass_colors():
285285 s = colorclass .Color ("{magenta}3.14{/magenta}" )
286286 result = tabulate ([[s ]], tablefmt = "plain" )
287287 expected = "\x1b [35m3.14\x1b [39m"
288- assert_equal (result , expected )
288+ assert_equal (expected , result )
289289 except ImportError :
290290
291291 class textclass (str ):
@@ -294,7 +294,7 @@ class textclass(str):
294294 s = textclass ("\x1b [35m3.14\x1b [39m" )
295295 result = tabulate ([[s ]], tablefmt = "plain" )
296296 expected = "\x1b [35m3.14\x1b [39m"
297- assert_equal (result , expected )
297+ assert_equal (expected , result )
298298
299299
300300def test_mix_normal_and_wide_characters ():
@@ -314,7 +314,7 @@ def test_mix_normal_and_wide_characters():
314314 "+--------+" ,
315315 ]
316316 )
317- assert_equal (result , expected )
317+ assert_equal (expected , result )
318318 except ImportError :
319319 skip ("test_mix_normal_and_wide_characters is skipped (requires wcwidth lib)" )
320320
@@ -334,7 +334,7 @@ def test_multiline_with_wide_characters():
334334 "╘══════╧══════╧══════╛" ,
335335 ]
336336 )
337- assert_equal (result , expected )
337+ assert_equal (expected , result )
338338 except ImportError :
339339 skip ("test_multiline_with_wide_characters is skipped (requires wcwidth lib)" )
340340
@@ -344,7 +344,7 @@ def test_align_long_integers():
344344 table = [[int (1 )], [int (234 )]]
345345 result = tabulate (table , tablefmt = "plain" )
346346 expected = "\n " .join ([" 1" , "234" ])
347- assert_equal (result , expected )
347+ assert_equal (expected , result )
348348
349349
350350def test_numpy_array_as_headers ():
@@ -355,7 +355,7 @@ def test_numpy_array_as_headers():
355355 headers = np .array (["foo" , "bar" ])
356356 result = tabulate ([], headers , tablefmt = "plain" )
357357 expected = "foo bar"
358- assert_equal (result , expected )
358+ assert_equal (expected , result )
359359 except ImportError :
360360 raise skip ("" )
361361
@@ -365,7 +365,7 @@ def test_boolean_columns():
365365 xortable = [[False , True ], [True , False ]]
366366 expected = "\n " .join (["False True" , "True False" ])
367367 result = tabulate (xortable , tablefmt = "plain" )
368- assert_equal (result , expected )
368+ assert_equal (expected , result )
369369
370370
371371def test_ansi_color_bold_and_fgcolor ():
@@ -383,14 +383,14 @@ def test_ansi_color_bold_and_fgcolor():
383383 "+---+---+---+" ,
384384 ]
385385 )
386- assert_equal (result , expected )
386+ assert_equal (expected , result )
387387
388388
389389def test_empty_table_with_keys_as_header ():
390390 "Regression: headers='keys' on an empty table (issue #81)"
391391 result = tabulate ([], headers = "keys" )
392392 expected = ""
393- assert_equal (result , expected )
393+ assert_equal (expected , result )
394394
395395
396396def test_escape_empty_cell_in_first_column_in_rst ():
@@ -409,15 +409,15 @@ def test_escape_empty_cell_in_first_column_in_rst():
409409 ]
410410 )
411411 result = tabulate (table , headers , tablefmt = "rst" )
412- assert_equal (result , expected )
412+ assert_equal (expected , result )
413413
414414
415415def test_ragged_rows ():
416416 "Regression: allow rows with different number of columns (issue #85)"
417417 table = [[1 , 2 , 3 ], [1 , 2 ], [1 , 2 , 3 , 4 ]]
418418 expected = "\n " .join (["- - - -" , "1 2 3" , "1 2" , "1 2 3 4" , "- - - -" ])
419419 result = tabulate (table )
420- assert_equal (result , expected )
420+ assert_equal (expected , result )
421421
422422
423423def test_empty_pipe_table_with_columns ():
@@ -426,7 +426,7 @@ def test_empty_pipe_table_with_columns():
426426 headers = ["Col1" , "Col2" ]
427427 expected = "\n " .join (["| Col1 | Col2 |" , "|--------|--------|" ])
428428 result = tabulate (table , headers , tablefmt = "pipe" )
429- assert_equal (result , expected )
429+ assert_equal (expected , result )
430430
431431
432432def test_custom_tablefmt ():
@@ -444,15 +444,15 @@ def test_custom_tablefmt():
444444 rows = [["foo" , "bar" ], ["baz" , "qux" ]]
445445 expected = "\n " .join (["A B" , "--- ---" , "foo bar" , "baz qux" ])
446446 result = tabulate (rows , headers = ["A" , "B" ], tablefmt = tablefmt )
447- assert_equal (result , expected )
447+ assert_equal (expected , result )
448448
449449
450450def test_string_with_comma_between_digits_without_floatfmt_grouping_option ():
451451 "Regression: accept commas in numbers-as-text when grouping is not defined (github issue #110)"
452452 table = [["126,000" ]]
453453 expected = "126,000"
454454 result = tabulate (table , tablefmt = "plain" )
455- assert_equal (result , expected ) # no exception
455+ assert_equal (expected , result ) # no exception
456456
457457
458458def test_iterable_row_index ():
@@ -469,7 +469,7 @@ def count(start, step=1):
469469
470470 expected = "1 a\n 2 b\n 3 c"
471471 result = tabulate (table , showindex = count (1 ), tablefmt = "plain" )
472- assert_equal (result , expected )
472+ assert_equal (expected , result )
473473
474474
475475def test_preserve_line_breaks_with_maxcolwidths ():
@@ -485,7 +485,7 @@ def test_preserve_line_breaks_with_maxcolwidths():
485485 ]
486486 )
487487 result = tabulate (table , tablefmt = "grid" , maxcolwidths = 10 )
488- assert_equal (result , expected )
488+ assert_equal (expected , result )
489489
490490
491491def test_exception_on_empty_data_with_maxcolwidths ():
@@ -509,6 +509,6 @@ def test_numpy_int64_as_integer():
509509 "| 1 | 3.14 |" ,
510510 ]
511511 )
512- assert_equal (result , expected )
512+ assert_equal (expected , result )
513513 except ImportError :
514514 raise skip ("" )
0 commit comments