raises: add missing | metacharacter to is_fully_escaped and unescape by bysiber · Pull Request #14222 · pytest-dev/pytest
The pipe character is a regex metacharacter (alternation operator) but is_fully_escaped did not include it, so a match pattern like '^foo|bar$' would be wrongly identified as a fully-escaped literal. This causes rawmatch to be set incorrectly, leading to misleading diff output on match failure. Also add | to the unescape function's character class for consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters