Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'tests/unit: Fix exception verification in json2code_test.py' f…
…rom Kefu Chai Previously, exception verification code was placed after the function call within assertRaises(), making it unreachable. This caused the test to pass without actually verifying the exception details. Move the verification code outside the assertRaises() block by capturing the exception first. This ensures the test properly validates both the exception type and its attributes. Example: Before: ```py with self.assertRaises(ValueError): function_call() self.assertEqual(exc.message, "expected message") # Never executed ``` After: ```py with self.assertRaises(ValueError) as e: function_call() self.assertEqual(e.exception.message, "expected message") # Executed ``` Closes #2654 * https://github.com/scylladb/seastar: tests/unit: Use http.HTTPStatus constants instead of raw status codes tests/unit: Fix exception verification in json2code_test.py
- Loading branch information