[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Note pynacl version when running tests



commit 9071c587f82df3158dc33059685cf0dec3551df0
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Feb 27 16:29:57 2017 -0800

    Note pynacl version when running tests
    
    Including our pynacl version in our testing header. This greatly helps when
    troubleshooting testing failures from others.
---
 run_tests.py | 1 +
 test/util.py | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/run_tests.py b/run_tests.py
index bceade3..fc6d906 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -161,6 +161,7 @@ def main():
     tor_version_check,
     Task('checking python version', test.util.check_python_version),
     Task('checking cryptography version', test.util.check_cryptography_version),
+    Task('checking pynacl version', test.util.check_pynacl_version),
     Task('checking mock version', test.util.check_mock_version),
     Task('checking pyflakes version', test.util.check_pyflakes_version),
     Task('checking pycodestyle version', test.util.check_pycodestyle_version),
diff --git a/test/util.py b/test/util.py
index ce1f8e8..18765ef 100644
--- a/test/util.py
+++ b/test/util.py
@@ -23,6 +23,7 @@ Tasks are...
   |- check_tor_version - checks our version of tor
   |- check_python_version - checks our version of python
   |- check_cryptography_version - checks our version of cryptography
+  |- check_pynacl_version - checks our version of pynacl
   |- check_pyflakes_version - checks our version of pyflakes
   |- check_pycodestyle_version - checks our version of pycodestyle
   |- clean_orphaned_pyc - removes any *.pyc without a corresponding *.py
@@ -222,6 +223,14 @@ def check_cryptography_version():
     return 'missing'
 
 
+def check_pynacl_version():
+  if stem.prereq._is_pynacl_available():
+    import nacl
+    return nacl.__version__
+  else:
+    return 'missing'
+
+
 def check_mock_version():
   if stem.prereq.is_mock_available():
     try:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits