[tor-commits] [stem/master] Accidently suppressing integ asserts

atagar at torproject.org atagar at torproject.org
Thu Oct 20 17:11:24 UTC 2011


commit 0a083c8b73a663d38f473e0180b0009d28e1b5d9
Author: Damian Johnson <atagar at torproject.org>
Date:   Thu Oct 20 10:09:36 2011 -0700

    Accidently suppressing integ asserts
    
    A previous commit to suppress errors from the close() method in python 2.7 also
    suppressed the following asserts. These asserts still work with 2.7 so removing
    them from the try block.
---
 test/integ/message.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/integ/message.py b/test/integ/message.py
index 053e9df..ae92af6 100644
--- a/test/integ/message.py
+++ b/test/integ/message.py
@@ -67,13 +67,13 @@ class TestMessageFunctions(unittest.TestCase):
     try:
       control_socket_file.close()
       control_socket_file.write("GETINFO version\r\n")
-      
-      # receives: AttributeError: 'NoneType' object has no attribute 'sendall'
-      self.assertRaises(AttributeError, control_socket_file.flush)
-      
-      # receives: stem.types.ControlSocketClosed: socket file has been closed
-      self.assertRaises(stem.types.ControlSocketClosed, stem.types.read_message, control_socket_file)
     except: pass
+    
+    # receives: AttributeError: 'NoneType' object has no attribute 'sendall'
+    self.assertRaises(AttributeError, control_socket_file.flush)
+    
+    # receives: stem.types.ControlSocketClosed: socket file has been closed
+    self.assertRaises(stem.types.ControlSocketClosed, stem.types.read_message, control_socket_file)
   
   def test_invalid_command(self):
     """



More information about the tor-commits mailing list