Skip to content

Commit

Permalink
fix tests failing after PR#183 (remove 1 space from the expected values)
Browse files Browse the repository at this point in the history
  • Loading branch information
astanin committed Oct 6, 2022
1 parent 930a943 commit 9172378
Showing 1 changed file with 37 additions and 35 deletions.
72 changes: 37 additions & 35 deletions test/test_output.py
Expand Up @@ -870,13 +870,13 @@ def test_heavy_grid_wide_characters():
headers[1] = "配列"
expected = "\n".join(
[
"┏━━━━━━━━━━━┳━━━━━━━━━━┓",
"┃ strings ┃ 配列 ┃",
"┣━━━━━━━━━━━╋━━━━━━━━━━┫",
"┃ spam ┃ 41.9999 ┃",
"┣━━━━━━━━━━━╋━━━━━━━━━━┫",
"┃ eggs ┃ 451 ┃",
"┗━━━━━━━━━━━┻━━━━━━━━━━┛",
"┏━━━━━━━━━━━┳━━━━━━━━━━┓",
"┃ strings ┃ 配列 ┃",
"┣━━━━━━━━━━━╋━━━━━━━━━━┫",
"┃ spam ┃ 41.9999 ┃",
"┣━━━━━━━━━━━╋━━━━━━━━━━┫",
"┃ eggs ┃ 451 ┃",
"┗━━━━━━━━━━━┻━━━━━━━━━━┛",
]
)
result = tabulate(_test_table, headers, tablefmt="heavy_grid")
Expand Down Expand Up @@ -1005,13 +1005,13 @@ def test_mixed_grid_wide_characters():
headers[1] = "配列"
expected = "\n".join(
[
"┍━━━━━━━━━━━┯━━━━━━━━━━┑",
"│ strings │ 配列 │",
"┝━━━━━━━━━━━┿━━━━━━━━━━┥",
"│ spam │ 41.9999 │",
"├───────────┼──────────┤",
"│ eggs │ 451 │",
"┕━━━━━━━━━━━┷━━━━━━━━━━┙",
"┍━━━━━━━━━━━┯━━━━━━━━━━┑",
"│ strings │ 配列 │",
"┝━━━━━━━━━━━┿━━━━━━━━━━┥",
"│ spam │ 41.9999 │",
"├───────────┼──────────┤",
"│ eggs │ 451 │",
"┕━━━━━━━━━━━┷━━━━━━━━━━┙",
]
)
result = tabulate(_test_table, headers, tablefmt="mixed_grid")
Expand Down Expand Up @@ -1596,12 +1596,12 @@ def test_heavy_outline_wide_characters():
headers[1] = "配列"
expected = "\n".join(
[
"┏━━━━━━━━━━━┳━━━━━━━━━━┓",
"┃ strings ┃ 配列 ┃",
"┣━━━━━━━━━━━╋━━━━━━━━━━┫",
"┃ spam ┃ 41.9999 ┃",
"┃ eggs ┃ 451 ┃",
"┗━━━━━━━━━━━┻━━━━━━━━━━┛",
"┏━━━━━━━━━━━┳━━━━━━━━━━┓",
"┃ strings ┃ 配列 ┃",
"┣━━━━━━━━━━━╋━━━━━━━━━━┫",
"┃ spam ┃ 41.9999 ┃",
"┃ eggs ┃ 451 ┃",
"┗━━━━━━━━━━━┻━━━━━━━━━━┛",
]
)
result = tabulate(_test_table, headers, tablefmt="heavy_outline")
Expand Down Expand Up @@ -1648,12 +1648,12 @@ def test_mixed_outline_wide_characters():
headers[1] = "配列"
expected = "\n".join(
[
"┍━━━━━━━━━━━┯━━━━━━━━━━┑",
"│ strings │ 配列 │",
"┝━━━━━━━━━━━┿━━━━━━━━━━┥",
"│ spam │ 41.9999 │",
"│ eggs │ 451 │",
"┕━━━━━━━━━━━┷━━━━━━━━━━┙",
"┍━━━━━━━━━━━┯━━━━━━━━━━┑",
"│ strings │ 配列 │",
"┝━━━━━━━━━━━┿━━━━━━━━━━┥",
"│ spam │ 41.9999 │",
"│ eggs │ 451 │",
"┕━━━━━━━━━━━┷━━━━━━━━━━┙",
]
)
result = tabulate(_test_table, headers, tablefmt="mixed_outline")
Expand Down Expand Up @@ -1910,16 +1910,17 @@ def test_orgtbl_headerless():
result = tabulate(_test_table, tablefmt="orgtbl")
assert_equal(expected, result)


def test_asciidoc():
"Output: asciidoc with headers"
expected = "\n".join(
[
'[cols="11<,11>",options="header"]',
'|====',
'| strings | numbers ',
'| spam | 41.9999 ',
'| eggs | 451 ',
'|===='
"|====",
"| strings | numbers ",
"| spam | 41.9999 ",
"| eggs | 451 ",
"|====",
]
)
result = tabulate(_test_table, _test_table_headers, tablefmt="asciidoc")
Expand All @@ -1931,15 +1932,16 @@ def test_asciidoc_headerless():
expected = "\n".join(
[
'[cols="6<,10>"]',
'|====',
'| spam | 41.9999 ',
'| eggs | 451 ',
'|===='
"|====",
"| spam | 41.9999 ",
"| eggs | 451 ",
"|====",
]
)
result = tabulate(_test_table, tablefmt="asciidoc")
assert_equal(expected, result)


def test_psql():
"Output: psql with headers"
expected = "\n".join(
Expand Down

0 comments on commit 9172378

Please sign in to comment.