Skip to content

Commit 47f2473

Browse files
committed
docs(waiter): add doctests for utility pattern matching functions
# What was changed - Added doctests for _contains_match showing patterns found, not found, and spanning multiple lines - Added doctests for _regex_match demonstrating string patterns, compiled patterns, and regex groups - Added doctests for _match_regex_across_lines showing multi-line pattern matching - Fixed implementation in _match_regex_across_lines to correctly determine starting line of multi-line matches - Fixed doctest in _contains_match to properly handle raw string escaping # Why these changes were made - Documentation as code: Provides executable examples of these utility functions - Quality assurance: Verifies that functions behave as expected - Previous line detection couldn't correctly identify which line a multi-line match started on - The new position-based approach correctly calculates starting line by counting newlines - The doctest fixes ensure correct testing of multi-line pattern matching
1 parent 797b057 commit 47f2473

File tree

1 file changed

+351
-15
lines changed

1 file changed

+351
-15
lines changed

0 commit comments

Comments
 (0)