diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-08-02 16:14:33 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-08-02 16:14:33 +1200 |
commit | 357502fe03a5f86c1c29d35c5d607541df157640 (patch) | |
tree | 76921abb49a94131e63e0e0d8a9e623a45642bc1 /test | |
parent | 17835b9b78ae08f84a97e1128c23d85eab74c339 (diff) | |
download | mitmproxy-357502fe03a5f86c1c29d35c5d607541df157640.tar.gz mitmproxy-357502fe03a5f86c1c29d35c5d607541df157640.tar.bz2 mitmproxy-357502fe03a5f86c1c29d35c5d607541df157640.zip |
General cleanup.
Cut out unused variables and code, generally shut up pychecker as much as is
reasonable.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_flow.py | 2 | ||||
-rw-r--r-- | test/test_utils.py | 24 | ||||
-rw-r--r-- | test/tutils.py | 2 |
3 files changed, 3 insertions, 25 deletions
diff --git a/test/test_flow.py b/test/test_flow.py index b87951b6..2e1975d9 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -489,7 +489,7 @@ class uFlowMaster(libpry.AutoTree): assert fm.do_server_playback(tutils.tflow()) q = Queue.Queue() fm.tick(q) - assert controller.exit + assert controller.should_exit fm.stop_server_playback() assert not fm.server_playback diff --git a/test/test_utils.py b/test/test_utils.py index e22ec039..06e5fed3 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -40,7 +40,7 @@ class upretty_size(libpry.AutoTree): class uData(libpry.AutoTree): def test_nonexistent(self): - libpry.raises("does not exist", utils.data.path, "nonexistent") + libpry.raises("does not exist", utils.pkg_data.path, "nonexistent") class uHeaders(libpry.AutoTree): @@ -147,26 +147,6 @@ class uHeaders(libpry.AutoTree): ] -class uisStringLike(libpry.AutoTree): - def test_all(self): - assert utils.isStringLike("foo") - assert not utils.isStringLike([1, 2, 3]) - assert not utils.isStringLike((1, 2, 3)) - assert not utils.isStringLike(["1", "2", "3"]) - - -class uisSequenceLike(libpry.AutoTree): - def test_all(self): - assert utils.isSequenceLike([1, 2, 3]) - assert utils.isSequenceLike((1, 2, 3)) - assert not utils.isSequenceLike("foobar") - assert utils.isSequenceLike(["foobar", "foo"]) - x = iter([1, 2, 3]) - assert utils.isSequenceLike(x) - assert not utils.isSequenceLike(1) - - - class upretty_xmlish(libpry.AutoTree): def test_tagre(self): def f(s): @@ -315,8 +295,6 @@ tests = [ uisXML(), uhexdump(), upretty_size(), - uisStringLike(), - uisSequenceLike(), uHeaders(), uData(), upretty_xmlish(), diff --git a/test/tutils.py b/test/tutils.py index 2327bdb9..19887fa9 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -66,7 +66,7 @@ class TestMaster(controller.Master): class ProxyThread(threading.Thread): def __init__(self, port, testq): self.tmaster = TestMaster(port, testq) - controller.exit = False + controller.should_exit = False threading.Thread.__init__(self) def run(self): |