Skip to content

Commit

Permalink
[py] fix text using caplog
Browse files Browse the repository at this point in the history
need to format the message instead of using the message string with placeholder
  • Loading branch information
titusfortner committed Oct 5, 2023
1 parent ff6e181 commit 6765b15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def test_missing_cdp_devtools_version_falls_back(caplog):
with caplog.at_level(logging.DEBUG, logger="selenium"):
assert isinstance(import_devtools("will_never_exist"), types.ModuleType)
# assert the fallback occurred successfully offered up a v{n} option.
assert re.match(r"Falling back to loading `devtools`: v\d+", caplog.records[-1].msg) is not None
assert re.match(r"Falling back to loading `devtools`: v\d+", caplog.records[-1].getMessage()) is not None

0 comments on commit 6765b15

Please sign in to comment.