From 357502fe03a5f86c1c29d35c5d607541df157640 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 2 Aug 2011 16:14:33 +1200 Subject: General cleanup. Cut out unused variables and code, generally shut up pychecker as much as is reasonable. --- test/test_flow.py | 2 +- test/test_utils.py | 24 +----------------------- test/tutils.py | 2 +- 3 files changed, 3 insertions(+), 25 deletions(-) (limited to 'test') 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): -- cgit v1.2.3