Skip to content

Commit

Permalink
pep8 cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
meejah committed Jul 9, 2013
1 parent 9063f4b commit 2a025e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test_torconfig.py
Expand Up @@ -988,7 +988,6 @@ def test_status_updates(self):
proto.status_client("NOTICE CONSENSUS_ARRIVED")



class FakeProtocolFactory:
implements(IProtocolFactory)

Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -1138,7 +1138,7 @@ def __call__(self, proto, trans):
self.fail()

except TorNotFound:
pass # success!
pass # success!
finally:
torconfig.find_tor_binary = oldone

Expand Down
9 changes: 8 additions & 1 deletion test/test_util.py
Expand Up @@ -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
Expand Down Expand Up @@ -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()

0 comments on commit 2a025e3

Please sign in to comment.