[tor-commits] [stem/master] Requirement check for the config-text test

atagar at torproject.org atagar at torproject.org
Thu Oct 27 17:06:08 UTC 2011


commit 7766cb79fff29020b72b5fe45fc43d184abada23
Author: Damian Johnson <atagar at torproject.org>
Date:   Thu Oct 27 07:16:06 2011 -0700

    Requirement check for the config-text test
    
    An integration test requires 'GETINFO config-text' requires tor version 0.2.2.7
    so adding a check for it.
---
 stem/types.py         |    2 ++
 test/integ/message.py |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/stem/types.py b/stem/types.py
index a83a7c2..630df9e 100644
--- a/stem/types.py
+++ b/stem/types.py
@@ -291,3 +291,5 @@ class Version:
     
     return cmp(my_status, other_status)
 
+REQ_GETINFO_CONFIG_TEXT = get_version("0.2.2.7")
+
diff --git a/test/integ/message.py b/test/integ/message.py
index ad5417a..2f10ed4 100644
--- a/test/integ/message.py
+++ b/test/integ/message.py
@@ -140,8 +140,8 @@ class TestMessageFunctions(unittest.TestCase):
     Parses the 'GETINFO config-text' response.
     """
     
-    # TODO: add a 0.2.2.7-alpha version check for this test (that was when
-    # 'GETINFO config-text' was added)
+    if stem.process.get_version() < stem.types.REQ_GETINFO_CONFIG_TEXT:
+      return
     
     # We can't be certain of the order, and there may be extra config-text
     # entries as per...





More information about the tor-commits mailing list