From 2a025e3d1a7f3c3276eee7ca0d242501e416a00a Mon Sep 17 00:00:00 2001 From: meejah Date: Tue, 9 Jul 2013 08:20:13 -0600 Subject: [PATCH] pep8 cleanups --- test/test_torconfig.py | 4 ++-- test/test_util.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/test_torconfig.py b/test/test_torconfig.py index 952ff53b..06d0cd28 100644 --- a/test/test_torconfig.py +++ b/test/test_torconfig.py @@ -988,7 +988,6 @@ def test_status_updates(self): proto.status_client("NOTICE CONSENSUS_ARRIVED") - class FakeProtocolFactory: implements(IProtocolFactory) @@ -1109,6 +1108,7 @@ def test_too_many_failures(self): d.addErrback(self.check_error) return d + class ErrorTests(unittest.TestCase): def test_no_tor_binary(self): @@ -1138,7 +1138,7 @@ def __call__(self, proto, trans): self.fail() except TorNotFound: - pass # success! + pass # success! finally: torconfig.find_tor_binary = oldone diff --git a/test/test_util.py b/test/test_util.py index f494ec22..6fbf3afe 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -4,7 +4,7 @@ from twisted.internet.interfaces import IProtocolFactory from zope.interface import implements -from txtorcon.util import process_from_address, delete_file_or_tree, find_keywords, ip_from_int +from txtorcon.util import process_from_address, delete_file_or_tree, find_keywords, ip_from_int, find_tor_binary import os import tempfile @@ -97,3 +97,10 @@ def test_delete_tree(self): self.assertTrue(not os.path.exists(d)) self.assertTrue(not os.path.exists(os.path.join(d, 'foo'))) + + +class TestFindTor(unittest.TestCase): + + def test_simple_find_tor(self): + ## just test that this doesn't raise an exception + find_tor_binary()