Update error check on test_load_script (#6726)

#### Description

This allows the "nonexistent" file error check to pass on systems that
don't use English as their primary language. With this, all mitmproxy
tests can pass on non-English machines.

Fixes #6723

#### Checklist

 - [X] I have updated tests where applicable.
 - [ ] I have added an entry to the CHANGELOG.
This commit is contained in:
Daniel López Guimaraes 2024-03-08 22:30:17 +01:00 committed by GitHub
parent 6156cbc0b1
commit 7930759962
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def test_load_script(tmp_path, tdata, caplog):
assert ns.addons
script.load_script("nonexistent")
assert "No such file or directory" in caplog.text
assert "FileNotFoundError" in caplog.text
(tmp_path / "error.py").write_text("this is invalid syntax")
script.load_script(str(tmp_path / "error.py"))