diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-04-17 08:13:50 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-04-17 08:20:52 +1200 |
commit | ef4db528871c96a0304a2057d5f1ee8330ca6122 (patch) | |
tree | 318d7c5720abcf975847ff2df9a3ec09f968bfce /test | |
parent | 754cb6cac9b1db56e2221fa379db014856a4725d (diff) | |
download | mitmproxy-ef4db528871c96a0304a2057d5f1ee8330ca6122.tar.gz mitmproxy-ef4db528871c96a0304a2057d5f1ee8330ca6122.tar.bz2 mitmproxy-ef4db528871c96a0304a2057d5f1ee8330ca6122.zip |
Ignore signal errors on windows + various fixes
- Ignore the NotImplementedError raised by add_signal_handler on Windows.
- Entrypoints return an integer exit code, or None. Adjust our type annotations
and code to suit.
Fixes #3061
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/tools/test_main.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/mitmproxy/tools/test_main.py b/test/mitmproxy/tools/test_main.py index ba213733..57544276 100644 --- a/test/mitmproxy/tools/test_main.py +++ b/test/mitmproxy/tools/test_main.py @@ -1,18 +1,19 @@ import pytest from mitmproxy.tools import main +from mitmproxy import ctx @pytest.mark.asyncio async def test_mitmweb(event_loop): - m = main.mitmweb([ + main.mitmweb([ "--no-web-open-browser", "-q", "-p", "0", ]) - await m._shutdown() + await ctx.master._shutdown() @pytest.mark.asyncio async def test_mitmdump(): - m = main.mitmdump(["-q", "-p", "0"]) - await m._shutdown() + main.mitmdump(["-q", "-p", "0"]) + await ctx.master._shutdown() |