Skip to content

Commit

Permalink
Merge pull request #206 from AsherGlick/fix_xml_diff
Browse files Browse the repository at this point in the history
Fixing the integration test printed xml diff to have correct newlines
  • Loading branch information
AsherGlick authored Nov 13, 2023
2 parents 1b751c3 + a5ca652 commit 4d829f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xml_converter/intigration_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def run_xml_converter(

def compare_text_files(file_path1: str, file_path2: str) -> List[str]:
with open(file_path1, 'r') as file1:
content1 = file1.readlines()
content1 = file1.read().split("\n")
with open(file_path2, 'r') as file2:
content2 = file2.readlines()
content2 = file2.read().split("\n")

diff = list(difflib.unified_diff(content1, content2, fromfile=file_path1, tofile=file_path2, lineterm=""))

Expand Down Expand Up @@ -181,7 +181,7 @@ def main() -> None:
if len_diff(xml_diff) != 0:
print(f"XML output was incorrect for test {testcase.name}")
for line in xml_diff:
print(line, end="")
print(line)
all_tests_passed = False

if testcase.expected_output_proto_path is not None:
Expand Down

0 comments on commit 4d829f3

Please sign in to comment.