Skip to content

Commit

Permalink
For testing 'mepo diff', ignore the last line '---'
Browse files Browse the repository at this point in the history
  • Loading branch information
pchakraborty committed Apr 15, 2024
1 parent 15156a5 commit 1bbe14d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_mepo_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,8 @@ def test_diff(self):
mepo_diff(args)
sys.stdout = sys.__stdout__
saved_output = self.__class__.__get_saved_output("output_diff.txt")
print(f"stdout output:\n{output.getvalue()}")
print(f"saved output:\n{saved_output}")
self.assertEqual(output.getvalue(), saved_output)
# Ignore the extra "-----" at the end of output
self.assertEqual(output.getvalue().split()[:-1], saved_output.split())
# Clean up
sp.run(f"git checkout {filename}".split(), stderr=sp.DEVNULL)
self.__mepo_status(self.__class__.output_clone_status)
Expand Down

0 comments on commit 1bbe14d

Please sign in to comment.