Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python
438 B
Raw Blame
import pytest


def test_project_invalid_escape_remains_an_error() -> None:
    source = r'''PROJECT_PATTERN = "\."'''

    # Compile-time invalid escapes become SyntaxError once the matching warning
    # is treated as an error (SyntaxWarning on 3.12+, DeprecationWarning on 3.11
    # via pytest.ini).
    with pytest.raises(SyntaxError, match="invalid escape sequence"):
        compile(source, "jiuwenswarm/warning_probe.py", "exec")