[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
dee1b68b6d
commit
be15c57fee
1 changed files with 8 additions and 7 deletions
|
|
@ -2047,9 +2047,7 @@ class TestDeviceLoginLogFilter:
|
|||
# caught when the production source is loaded.
|
||||
import importlib
|
||||
|
||||
mod = importlib.reload(
|
||||
importlib.import_module("core.inference.codex_provider")
|
||||
)
|
||||
mod = importlib.reload(importlib.import_module("core.inference.codex_provider"))
|
||||
# Walk the source string to find the patterns; they live inside
|
||||
# the generator. Use a stable proxy: read the regex literals.
|
||||
import re
|
||||
|
|
@ -2059,8 +2057,10 @@ class TestDeviceLoginLogFilter:
|
|||
# phrases AND an unsafe-content blocklist.
|
||||
assert "safe_log_res" in src
|
||||
assert "unsafe_log_re" in src
|
||||
assert "not\\s+(?:logged|signed)\\s+in" in src or \
|
||||
"not\\\\s+(?:logged|signed)\\\\s+in" in src
|
||||
assert (
|
||||
"not\\s+(?:logged|signed)\\s+in" in src
|
||||
or "not\\\\s+(?:logged|signed)\\\\s+in" in src
|
||||
)
|
||||
return None
|
||||
|
||||
def test_safe_log_source_has_anchored_patterns_and_blocklist(self):
|
||||
|
|
@ -2117,5 +2117,6 @@ class TestDeviceLoginLogFilter:
|
|||
"Browser opened",
|
||||
"Press Ctrl+C to cancel",
|
||||
]:
|
||||
assert any(pat.search(clean) for pat in safe_log_res), \
|
||||
f"clean line should match safe: {clean!r}"
|
||||
assert any(
|
||||
pat.search(clean) for pat in safe_log_res
|
||||
), f"clean line should match safe: {clean!r}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue