Any change in the Python code alters the backtrace, causing the "Empty vCard" test to fail unnecessarily. The failure occurs unless the expected output file (test/cases/Empty vCard/expected/FAILURE) is updated to match the new backtrace, even though the actual issue remains unchanged.
This patch enhances the test by only comparing the last line of the error output:
ValueError: Trying to select a name from an empty list of names. This avoids fragile backtrace comparisons and focuses on the relevant error message.
Any change in the Python code alters the backtrace, causing the "Empty vCard" test to fail unnecessarily. The failure occurs unless the expected output file (test/cases/Empty vCard/expected/FAILURE) is updated to match the new backtrace, even though the actual issue remains unchanged.
This patch enhances the test by only comparing the last line of the error output:
ValueError: Trying to select a name from an empty list of names
. This avoids fragile backtrace comparisons and focuses on the relevant error message.