Skip to content

Commit

Permalink
Modify outpu messages for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Jan 1, 2017
1 parent a5d4789 commit a4ad630
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions test/test_html_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ def test_normal(
loader.table_name = table_name

for tabledata, expected in zip(loader.load(), expected_tabledata_list):
print("[test {}]".format(test_id))
print("expected: {}".format(ptw.dump_tabledata(expected)))
print("actual: {}".format(ptw.dump_tabledata(tabledata)))
print("--- test {} ---".format(test_id))
print("[expected]\n{}".format(ptw.dump_tabledata(expected)))
print("[actual]\n{}".format(ptw.dump_tabledata(tabledata)))
print("")

assert tabledata == expected
Expand Down
4 changes: 2 additions & 2 deletions test/test_ltsv_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def test_normal(

for tabledata in loader.load():
print("test-id={}".format(test_id))
print("[expected]: {}".format(ptw.dump_tabledata(expected)))
print("[actual]: {}".format(ptw.dump_tabledata(tabledata)))
print("[expected]\n{}".format(ptw.dump_tabledata(expected)))
print("[actual]\n{}".format(ptw.dump_tabledata(tabledata)))

assert tabledata == expected

Expand Down
12 changes: 6 additions & 6 deletions test/test_markdown_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ def test_normal(

load = False
for tabledata, expected in zip(loader.load(), expected_tabledata_list):
print("test {}".format(test_id))
print(" tabledata: {}".format(tabledata))
print(" expected: {}".format(expected))
print("--- test {} ---".format(test_id))
print("[tabledata]\n{}".format(tabledata))
print("[expected]\n{}".format(expected))
print("")
assert tabledata == expected
load = True
Expand Down Expand Up @@ -405,9 +405,9 @@ def test_normal(self, test_id, table_text, table_name, expected_tabletuple_list)

load = False
for tabledata in loader.load():
print("id: {}".format(test_id))
print(" tabledata: {}".format(tabledata))
print(" expected:")
print("--- id: {} ---".format(test_id))
print("[tabledata]\n{}".format(tabledata))
print("[expected]")
for expected in expected_tabletuple_list:
print(" {}".format(expected))
print("")
Expand Down
12 changes: 6 additions & 6 deletions test/test_mediawiki_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ def test_normal(

load = False
for tabledata, expected in zip(loader.load(), expected_tabledata_list):
print("test {}".format(test_id))
print(" tabledata: {}".format(tabledata))
print(" expected: {}".format(expected))
print("--- test {} ---".format(test_id))
print("[tabledata]\n{}".format(tabledata))
print("[expected]\n{}".format(expected))
print("")
assert tabledata == expected

Expand Down Expand Up @@ -466,9 +466,9 @@ def test_normal(self, test_id, table_text, table_name, expected_tabletuple_list)

load = False
for tabledata in loader.load():
print("id: {}".format(test_id))
print(" tabledata: {}".format(tabledata))
print(" expected:")
print("--- id {} ---".format(test_id))
print("[tabledata]\n{}".format(tabledata))
print("[expected]")
for expected in expected_tabletuple_list:
print(" {}".format(expected))
print("")
Expand Down

0 comments on commit a4ad630

Please sign in to comment.