]> granicus.if.org Git - python/commitdiff
* Skip test_pipes on non-POSIX.
authorGeorg Brandl <georg@python.org>
Thu, 30 Aug 2007 12:32:23 +0000 (12:32 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 30 Aug 2007 12:32:23 +0000 (12:32 +0000)
* Don't raise TestSkipped within a test function.

Lib/test/test_pipes.py
Lib/test/test_winreg.py

index 70d1ec2b946287fed2c8e29ba8b653894511e4a4..a440ac1c92dfa41f7d31a6b2d5ef80c53709cddd 100644 (file)
@@ -2,7 +2,10 @@ import pipes
 import os
 import string
 import unittest
-from test.test_support import TESTFN, run_unittest, unlink
+from test.test_support import TESTFN, run_unittest, unlink, TestSkipped
+
+if os.name != 'posix':
+    raise TestSkipped('pipes module only works on posix')
 
 TESTFN2 = TESTFN + "2"
 
index ce8f85ae1cf5f5d410f7123c93ed5f2cb8bce53e..85a0aacb95d8594c5136a18681c36bb56d616214 100644 (file)
@@ -157,8 +157,7 @@ class WinregTests(unittest.TestCase):
 
     def testRemoteMachineRegistryWorks(self):
         if not self.remote_name:
-            raise test_support.TestSkipped("Remote machine name "
-                                           "not specified.")
+            return # remote machine name not specified
         remote_key = ConnectRegistry(self.remote_name, HKEY_CURRENT_USER)
         self.TestAll(remote_key)