[tor-commits] [stem/master] Removing pydocs from test classes

atagar at torproject.org atagar at torproject.org
Sun Jan 29 08:54:42 UTC 2012


commit 92cf5eb531ab7bfda4361f15b8c5eba92b2050f8
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Jan 28 10:54:08 2012 -0800

    Removing pydocs from test classes
    
    The documentation in the headers and classes for unit and integ tests were
    redundant. Joining the two and removing pydoc blocks from the tet classes.
---
 test/integ/connection/authentication.py |    5 -----
 test/integ/connection/connect.py        |    5 -----
 test/integ/connection/protocolinfo.py   |    5 -----
 test/integ/socket/control_message.py    |    4 ----
 test/integ/util/conf.py                 |    4 ----
 test/integ/util/system.py               |    9 ++-------
 test/integ/version.py                   |    8 ++------
 test/unit/connection/authentication.py  |   16 +++++++---------
 test/unit/connection/protocolinfo.py    |    4 ----
 test/unit/socket/control_line.py        |    4 ----
 test/unit/socket/control_message.py     |    5 -----
 test/unit/util/conf.py                  |    4 ----
 test/unit/util/enum.py                  |    4 ----
 test/unit/util/system.py                |    4 ----
 test/unit/version.py                    |    4 ----
 15 files changed, 11 insertions(+), 74 deletions(-)

diff --git a/test/integ/connection/authentication.py b/test/integ/connection/authentication.py
index 886fbb8..bc94ead 100644
--- a/test/integ/connection/authentication.py
+++ b/test/integ/connection/authentication.py
@@ -24,11 +24,6 @@ INCORRECT_COOKIE_FAIL = "Authentication failed: Authentication cookie did not ma
 INCORRECT_PASSWORD_FAIL = "Authentication failed: Password did not match HashedControlPassword value from configuration"
 
 class TestAuthenticate(unittest.TestCase):
-  """
-  Tests the authentication methods. This should be run with the 'RUN_ALL'
-  integ target to exercise the widest range of use cases.
-  """
-  
   def setUp(self):
     # none of these tests apply if there's no control connection
     if not test.runner.get_runner().is_accessible():
diff --git a/test/integ/connection/connect.py b/test/integ/connection/connect.py
index fb13d20..00b0e04 100644
--- a/test/integ/connection/connect.py
+++ b/test/integ/connection/connect.py
@@ -10,11 +10,6 @@ import stem.connection
 import test.runner
 
 class TestConnect(unittest.TestCase):
-  """
-  Tests the connection methods. This should be run with the 'RUN_ALL' integ
-  target to exercise the widest range of use cases.
-  """
-  
   def setUp(self):
     # none of these tests apply if there's no control connection
     if not test.runner.get_runner().is_accessible():
diff --git a/test/integ/connection/protocolinfo.py b/test/integ/connection/protocolinfo.py
index 51076a2..6c9519e 100644
--- a/test/integ/connection/protocolinfo.py
+++ b/test/integ/connection/protocolinfo.py
@@ -11,11 +11,6 @@ import stem.connection
 import stem.util.system
 
 class TestProtocolInfo(unittest.TestCase):
-  """
-  Queries and parses PROTOCOLINFO. This should be run with the 'RUN_ALL'
-  integ target to exercise the widest range of use cases.
-  """
-  
   def tearDown(self):
     # resets call mocking back to being disabled
     stem.util.system.CALL_MOCKING = None
diff --git a/test/integ/socket/control_message.py b/test/integ/socket/control_message.py
index 33a54bf..ec99edb 100644
--- a/test/integ/socket/control_message.py
+++ b/test/integ/socket/control_message.py
@@ -11,10 +11,6 @@ import stem.version
 import test.runner
 
 class TestControlMessage(unittest.TestCase):
-  """
-  Exercises the 'stem.socket.ControlMessage' class with an actual tor instance.
-  """
-  
   def test_unestablished_socket(self):
     """
     Checks message parsing when we have a valid but unauthenticated socket.
diff --git a/test/integ/util/conf.py b/test/integ/util/conf.py
index e6dfedb..b589761 100644
--- a/test/integ/util/conf.py
+++ b/test/integ/util/conf.py
@@ -41,10 +41,6 @@ multiline.entry.squashed_bottom
 """
 
 class TestConf(unittest.TestCase):
-  """
-  Tests the stem.util.conf contents.
-  """
-  
   def tearDown(self):
     # clears the config contents
     test_config = stem.util.conf.get_config("integ_testing")
diff --git a/test/integ/util/system.py b/test/integ/util/system.py
index 986734e..9295e9b 100644
--- a/test/integ/util/system.py
+++ b/test/integ/util/system.py
@@ -1,6 +1,6 @@
 """
-Integration tests for the stem.util.system functions in the context of a tor
-process.
+Integratnio tests for the stem.util.system functions against the tor process
+that we're running.
 """
 
 import os
@@ -11,11 +11,6 @@ import test.runner
 import stem.util.system
 
 class TestSystem(unittest.TestCase):
-  """
-  Tests the stem.util.system functions against the tor process that we're
-  running.
-  """
-  
   is_extra_tor_running = None
   
   def setUp(self):
diff --git a/test/integ/version.py b/test/integ/version.py
index 9fa7fd8..616ae57 100644
--- a/test/integ/version.py
+++ b/test/integ/version.py
@@ -1,5 +1,6 @@
 """
-Integration tests for tor version parsing.
+Tests that the stem.version functions can handle the tor instance we're
+running with.
 """
 
 import unittest
@@ -8,11 +9,6 @@ import test.runner
 import stem.version
 
 class TestVersion(unittest.TestCase):
-  """
-  Tests that the stem.version functions can handle the tor instance we're
-  running with.
-  """
-  
   def test_get_system_tor_version(self):
     """
     Basic verification checks for the get_system_tor_version() function.
diff --git a/test/unit/connection/authentication.py b/test/unit/connection/authentication.py
index 0b3a60e..b3f2a91 100644
--- a/test/unit/connection/authentication.py
+++ b/test/unit/connection/authentication.py
@@ -1,5 +1,12 @@
 """
 Unit tests for the stem.connection.authenticate function.
+
+Under the covers the authentiate function really just translates a
+PROTOCOLINFO response into authenticate_* calls, then does prioritization
+on the exceptions if they all fail.
+
+This monkey patches the various functions authenticate relies on to exercise
+various error conditions, and make sure that the right exception is raised.
 """
 
 import unittest
@@ -28,15 +35,6 @@ def _get_all_auth_method_combinations():
           yield tuple(auth_methods)
 
 class TestAuthenticate(unittest.TestCase):
-  """
-  Under the covers the authentiate function really just translates a
-  PROTOCOLINFO response into authenticate_* calls, then does prioritization
-  on the exceptions if they all fail.
-  
-  This monkey patches the various functions authenticate relies on to exercise
-  various error conditions, and make sure that the right exception is raised.
-  """
-  
   def setUp(self):
     mocking.mock(stem.connection.get_protocolinfo, mocking.no_op())
     mocking.mock(stem.connection.authenticate_none, mocking.no_op())
diff --git a/test/unit/connection/protocolinfo.py b/test/unit/connection/protocolinfo.py
index 0f47fe1..c49e9bb 100644
--- a/test/unit/connection/protocolinfo.py
+++ b/test/unit/connection/protocolinfo.py
@@ -43,10 +43,6 @@ RELATIVE_COOKIE_PATH = r"""250-PROTOCOLINFO 1
 250 OK"""
 
 class TestProtocolInfoResponse(unittest.TestCase):
-  """
-  Tests the parsing of ControlMessages for PROTOCOLINFO responses.
-  """
-  
   def test_convert(self):
     """
     Exercises functionality of the convert method both when it works and
diff --git a/test/unit/socket/control_line.py b/test/unit/socket/control_line.py
index ceb350f..6e59f43 100644
--- a/test/unit/socket/control_line.py
+++ b/test/unit/socket/control_line.py
@@ -14,10 +14,6 @@ PROTOCOLINFO_RESPONSE = (
 )
 
 class TestControlLine(unittest.TestCase):
-  """
-  Tests methods of the stem.socket.ControlLine class.
-  """
-  
   def test_pop_examples(self):
     """
     Checks that the pop method's pydoc examples are correct.
diff --git a/test/unit/socket/control_message.py b/test/unit/socket/control_message.py
index 8bb6fef..37f1cc0 100644
--- a/test/unit/socket/control_message.py
+++ b/test/unit/socket/control_message.py
@@ -30,11 +30,6 @@ version -- The current version of Tor.
 """.replace("\n", "\r\n")
 
 class TestControlMessage(unittest.TestCase):
-  """
-  Tests methods and functions related to 'stem.socket.ControlMessage'. This uses
-  StringIO to make 'files' to mock socket input.
-  """
-  
   def test_ok_response(self):
     """
     Checks the basic 'OK' response that we get for most commands.
diff --git a/test/unit/util/conf.py b/test/unit/util/conf.py
index 0a31381..9238f7f 100644
--- a/test/unit/util/conf.py
+++ b/test/unit/util/conf.py
@@ -6,10 +6,6 @@ import unittest
 import stem.util.conf
 
 class TestConf(unittest.TestCase):
-  """
-  Tests the stem.util.conf contents.
-  """
-  
   def tearDown(self):
     # clears the config contents
     test_config = stem.util.conf.get_config("unit_testing")
diff --git a/test/unit/util/enum.py b/test/unit/util/enum.py
index 912b64f..b688a27 100644
--- a/test/unit/util/enum.py
+++ b/test/unit/util/enum.py
@@ -6,10 +6,6 @@ import unittest
 import stem.util.enum
 
 class TestEnum(unittest.TestCase):
-  """
-  Tests the stem.util.enum contents.
-  """
-  
   def test_to_camel_case(self):
     """
     Checks the stem.util.enum.to_camel_case function.
diff --git a/test/unit/util/system.py b/test/unit/util/system.py
index 4821073..836b11b 100644
--- a/test/unit/util/system.py
+++ b/test/unit/util/system.py
@@ -72,10 +72,6 @@ def mock_call(base_cmd, responses, command):
         return responses[cmd_completion]
 
 class TestSystem(unittest.TestCase):
-  """
-  Tests the stem.util.system contents.
-  """
-  
   def setUp(self):
     test.mocking.mock(stem.util.proc.is_available, test.mocking.return_false())
     test.mocking.mock(system.is_available, test.mocking.return_true())
diff --git a/test/unit/version.py b/test/unit/version.py
index 787d9c8..5ba7a62 100644
--- a/test/unit/version.py
+++ b/test/unit/version.py
@@ -6,10 +6,6 @@ import unittest
 import stem.version
 
 class TestVersion(unittest.TestCase):
-  """
-  Tests methods and functions related to 'stem.version.Version'.
-  """
-  
   def test_parsing(self):
     """
     Tests parsing by the Version class constructor.





More information about the tor-commits mailing list