From 3ec7880dc81eb6970c98d1a17f73133861ff239b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 11 May 2023 22:10:21 -0700 Subject: [PATCH] added tests --- tests/test_utils.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 631e698fa..f7c06b329 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -76,9 +76,27 @@ oops! """ with self.assertRaises(ValueError) as cm: - utils.find_original_update_blocks(edit) + list(utils.find_original_update_blocks(edit)) self.assertIn("Incomplete", str(cm.exception)) + def test_find_original_update_blocks_missing_filename(self): + edit = """ +Here's the change: + +```text +<<<<<<< ORIGINAL +Two +======= +Tooooo + + +oops! +""" + + with self.assertRaises(ValueError) as cm: + list(utils.find_original_update_blocks(edit)) + self.assertIn("filename", str(cm.exception)) + if __name__ == "__main__": unittest.main()