tests: remove file with invalid syntax
This commit is contained in:
parent
360ac36666
commit
c2e8987c5f
|
@ -19,7 +19,7 @@ from mitmproxy.tools import main
|
||||||
script.ReloadInterval = 0.1
|
script.ReloadInterval = 0.1
|
||||||
|
|
||||||
|
|
||||||
def test_load_script(tdata, caplog):
|
def test_load_script(tmp_path, tdata, caplog):
|
||||||
ns = script.load_script(
|
ns = script.load_script(
|
||||||
tdata.path("mitmproxy/data/addonscripts/recorder/recorder.py")
|
tdata.path("mitmproxy/data/addonscripts/recorder/recorder.py")
|
||||||
)
|
)
|
||||||
|
@ -28,7 +28,8 @@ def test_load_script(tdata, caplog):
|
||||||
script.load_script("nonexistent")
|
script.load_script("nonexistent")
|
||||||
assert "No such file or directory" in caplog.text
|
assert "No such file or directory" in caplog.text
|
||||||
|
|
||||||
script.load_script(tdata.path("mitmproxy/data/addonscripts/recorder/error.py"))
|
(tmp_path / "error.py").write_text("this is invalid syntax")
|
||||||
|
script.load_script(str(tmp_path / "error.py"))
|
||||||
assert "invalid syntax" in caplog.text
|
assert "invalid syntax" in caplog.text
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
"""
|
|
||||||
This file is intended to have syntax errors for test purposes
|
|
||||||
"""
|
|
||||||
|
|
||||||
impotr recorder # Intended Syntax Error
|
|
||||||
|
|
||||||
addons = [recorder.Recorder("e")]
|
|
Loading…
Reference in New Issue