[tor-commits] [stem/master] Running python 3 tests errors when done with python 2.6

atagar at torproject.org atagar at torproject.org
Sat Mar 23 03:36:13 UTC 2013


commit bee3c2b53653976a36b16a7cefb6e11bb56e4045
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Mar 22 20:32:07 2013 -0700

    Running python 3 tests errors when done with python 2.6
    
    When running tests with '--python3' we were using the named tuple
    sys.version_info. This was just a normal tuple prior to python 2.7, causing an
    error when run with python 2.6. Caught and fixed by Desoxy...
    
    https://trac.torproject.org/8565
---
 run_tests.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 93acb03..62d3799 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -425,7 +425,7 @@ if __name__ == '__main__':
         test.output.print_line("Unable to test python 3 because %s isn't in your path" % required_cmd, *test.runner.ERROR_ATTR)
         sys.exit(1)
 
-  if CONFIG["argument.python3"] and sys.version_info.major != 3:
+  if CONFIG["argument.python3"] and sys.version_info[0] != 3:
     python3_destination = os.path.join(CONFIG["integ.test_directory"], "python3")
 
     if _python3_setup(python3_destination):



More information about the tor-commits mailing list