MCPcopy Create free account
hub / github.com/microsoft/playwright-python / glob_to_regex

Function glob_to_regex

tests/async/test_page_route.py:1055–1056  ·  view source on GitHub ↗
(pattern: str)

Source from the content-addressed store, hash-verified

1053
1054async def test_should_work_with_glob() -> None:
1055 def glob_to_regex(pattern: str) -> re.Pattern:
1056 return re.compile(glob_to_regex_pattern(pattern))
1057
1058 assert glob_to_regex("**/*.js").match("https://localhost:8080/foo.js")
1059 assert not glob_to_regex("**/*.css").match("https://localhost:8080/foo.js")

Callers 1

Calls 1

glob_to_regex_patternFunction · 0.90

Tested by

no test coverage detected