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

[tor-commits] [bridgedb/master] Use processExists() to decide SkipTest in test_bridgedb.py.



commit c8b6c0dc15ad951f8d8d89608f67e1e619b1ab44
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Wed Aug 27 05:33:01 2014 +0000

    Use processExists() to decide SkipTest in test_bridgedb.py.
---
 lib/bridgedb/test/test_bridgedb.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bridgedb/test/test_bridgedb.py b/lib/bridgedb/test/test_bridgedb.py
index 750ddd4..b5a7159 100644
--- a/lib/bridgedb/test/test_bridgedb.py
+++ b/lib/bridgedb/test/test_bridgedb.py
@@ -59,7 +59,7 @@ class BridgeDBCliTest(unittest.TestCase):
         This test ensures that an ``assignments.log`` file is created after a
         BridgeDB process was started.
         """
-        if not self.pid:
+        if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 
         self.assertTrue(os.path.isfile(self.assignmentsFile))
@@ -68,7 +68,7 @@ class BridgeDBCliTest(unittest.TestCase):
         """Test that BridgeDB creates a new ``assignments.log`` file after
         receiving a SIGHUP.
         """
-        if not self.pid:
+        if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 
         os.unlink(self.assignmentsFile)
@@ -78,7 +78,7 @@ class BridgeDBCliTest(unittest.TestCase):
 
     def test_bridgedb_SIGUSR1_buckets(self):
         """Test that BridgeDB dumps buckets appropriately after a SIGUSR1."""
-        if not self.pid:
+        if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 
         os.kill(self.pid, signal.SIGUSR1)



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