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()