Skip to content

Fix invalid escape sequence warnings in test_macros.py - #744

Merged
ianpittwood merged 1 commit into
mainfrom
fix/test-macros-syntax-warning
Aug 17, 2026
Merged

Fix invalid escape sequence warnings in test_macros.py#744
ianpittwood merged 1 commit into
mainfrom
fix/test-macros-syntax-warning

Conversation

@bschwedler

Copy link
Copy Markdown
Contributor

Regex patterns embedded in expected test strings used a bare \. inside regular (non-raw) triple-quoted strings, which Python 3.12 flags as SyntaxWarning: invalid escape sequence. Escaped the backslash (\. -> \\.) so the literal string value is unchanged but the warning is eliminated.

CI was emitting eight of these warnings per occurrence across parallel workers, cluttering the pytest output.

Regex patterns embedded in expected test strings used a bare \.
inside regular (non-raw) triple-quoted strings, which Python 3.12
flags as SyntaxWarning: invalid escape sequence '\.'. Escape the
backslash properly (\\.) so the literal string value is unchanged
but the warning is eliminated.

CI test runs were emitting eight of these warnings per occurrence
(4 occurrences x parallel workers), cluttering the pytest output.
@github-actions

Copy link
Copy Markdown

Test Results

2 079 tests  ±0   2 079 ✅ ±0   8m 14s ⏱️ - 1m 44s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit dc12af7. ± Comparison against base commit 5693eac.

@ianpittwood
ianpittwood added this pull request to the merge queue Aug 17, 2026
Merged via the queue into main with commit d5d553d Aug 17, 2026
25 checks passed
@ianpittwood
ianpittwood deleted the fix/test-macros-syntax-warning branch August 17, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants