From ef4db528871c96a0304a2057d5f1ee8330ca6122 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 17 Apr 2018 08:13:50 +1200 Subject: 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 --- test/mitmproxy/tools/test_main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test') 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() -- cgit v1.2.3