diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-07-07 01:31:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-07 01:31:06 -0700 |
commit | c57c203037f5e43fc7948a0f2a185ac6b6ec9d42 (patch) | |
tree | bc77a497bdfd11516e91c341a3107f098c384824 | |
parent | 64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9 (diff) | |
parent | f259b9478fb03e816af8abde29ae369342d40e4f (diff) | |
download | mitmproxy-c57c203037f5e43fc7948a0f2a185ac6b6ec9d42.tar.gz mitmproxy-c57c203037f5e43fc7948a0f2a185ac6b6ec9d42.tar.bz2 mitmproxy-c57c203037f5e43fc7948a0f2a185ac6b6ec9d42.zip |
Merge pull request #1323 from mhils/test-examples
Exclude harparser script on Python 3
-rw-r--r-- | examples/har_extractor.py | 6 | ||||
-rw-r--r-- | test/mitmproxy/test_examples.py | 7 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py index d6b50c21..a5c05519 100644 --- a/examples/har_extractor.py +++ b/examples/har_extractor.py @@ -60,6 +60,12 @@ def start(context): suit your actual needs of HAR generation. As it will probably be necessary to cluster logs by IPs or reset them from time to time. """ + if sys.version_info >= (3, 0): + raise RuntimeError( + "har_extractor.py does not work on Python 3. " + "Please check out https://github.com/mitmproxy/mitmproxy/issues/1320 " + "if you want to help making this work again." + ) context.dump_file = None if len(sys.argv) > 1: context.dump_file = sys.argv[1] diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index 22d3c425..206a0366 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -1,6 +1,7 @@ import glob import json import os +import sys from contextlib import contextmanager from mitmproxy import script @@ -133,6 +134,12 @@ def test_redirect_requests(): def test_har_extractor(): + if sys.version_info >= (3, 0): + with tutils.raises("does not work on Python 3"): + with example("har_extractor.py -"): + pass + return + with tutils.raises(script.ScriptException): with example("har_extractor.py"): pass @@ -16,7 +16,7 @@ commands = [testenv:py35] setenv = - TESTS = test/netlib test/pathod/ test/mitmproxy/script test/mitmproxy/test_contentview.py test/mitmproxy/test_custom_contentview.py test/mitmproxy/test_app.py test/mitmproxy/test_controller.py test/mitmproxy/test_fuzzing.py test/mitmproxy/test_script.py test/mitmproxy/test_web_app.py test/mitmproxy/test_utils.py test/mitmproxy/test_stateobject.py test/mitmproxy/test_cmdline.py test/mitmproxy/test_contrib_tnetstring.py test/mitmproxy/test_proxy.py test/mitmproxy/test_protocol_http1.py test/mitmproxy/test_platform_pf.py test/mitmproxy/test_server.py test/mitmproxy/test_filt.py test/mitmproxy/test_flow_export.py test/mitmproxy/test_web_master.py test/mitmproxy/test_flow_format_compat.py + TESTS = test/netlib test/pathod/ test/mitmproxy/script test/mitmproxy/test_contentview.py test/mitmproxy/test_custom_contentview.py test/mitmproxy/test_app.py test/mitmproxy/test_controller.py test/mitmproxy/test_fuzzing.py test/mitmproxy/test_script.py test/mitmproxy/test_web_app.py test/mitmproxy/test_utils.py test/mitmproxy/test_stateobject.py test/mitmproxy/test_cmdline.py test/mitmproxy/test_contrib_tnetstring.py test/mitmproxy/test_proxy.py test/mitmproxy/test_protocol_http1.py test/mitmproxy/test_platform_pf.py test/mitmproxy/test_server.py test/mitmproxy/test_filt.py test/mitmproxy/test_flow_export.py test/mitmproxy/test_web_master.py test/mitmproxy/test_flow_format_compat.py test/mitmproxy/test_examples.py HOME = {envtmpdir} [testenv:docs] |