r"""When generating nodeids, if the source name contains special characters like a newline, they are escaped into two characters like \n. Therefore, a user will never need to insert a literal newline, only \n (two chars). So mark expressions themselves do not support escaping, instead th
()
| 67 | |
| 68 | |
| 69 | def test_backslash_not_treated_specially() -> None: |
| 70 | r"""When generating nodeids, if the source name contains special characters |
| 71 | like a newline, they are escaped into two characters like \n. Therefore, a |
| 72 | user will never need to insert a literal newline, only \n (two chars). So |
| 73 | mark expressions themselves do not support escaping, instead they treat |
| 74 | backslashes as regular identifier characters.""" |
| 75 | matcher = {r"\nfoo\n"}.__contains__ |
| 76 | |
| 77 | assert evaluate(r"\nfoo\n", matcher) |
| 78 | assert not evaluate(r"foo", matcher) |
| 79 | with pytest.raises(ParseError): |
| 80 | evaluate("\nfoo\n", matcher) |
| 81 | |
| 82 | |
| 83 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected