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

[tor-commits] [stem/master] Skip integ tests for util.system if pgrep is unavailable.



commit 5c18901aa94ada77f43c1f67d91f4ee300ccea67
Author: Beck Chen <csybeck@xxxxxxxxx>
Date:   Thu Jun 14 19:32:36 2012 +0800

    Skip integ tests for util.system if pgrep is unavailable.
    
    Since pgrep is used in setUp() of test.integ.util.system.TestSystem, all
    test cases would fail if pgrep is unavailable in the current platform
    (e.g. windows). We'll simply skip them for now.
---
 test/integ/util/system.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/test/integ/util/system.py b/test/integ/util/system.py
index 60703e9..58e0248 100644
--- a/test/integ/util/system.py
+++ b/test/integ/util/system.py
@@ -44,6 +44,8 @@ class TestSystem(unittest.TestCase):
     if self.is_extra_tor_running is None:
       if not stem.util.system.is_bsd():
         pgrep_results = stem.util.system.call(stem.util.system.GET_PID_BY_NAME_PGREP % "tor")
+        if pgrep_results is None:
+          self.skipTest("(pgrep unavailable)")
         self.is_extra_tor_running = len(pgrep_results) > 1
       else:
         ps_results = stem.util.system.call(stem.util.system.GET_PID_BY_NAME_PS_BSD)



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