Code

Forward-porting of fixes from the maintenance branch.
[roundup.git] / test / test_locking.py
index 0c27f03e4c7f57ab8dc8bdebea71f297f08cdb44..b5945731fba242cd726ec92409f8a91e84528ed2 100644 (file)
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-# $Id: test_locking.py,v 1.2 2002-09-10 00:19:54 richard Exp $
+# $Id: test_locking.py,v 1.4 2003-10-25 22:53:26 richard Exp $
 
 import os, unittest, tempfile
 
@@ -29,7 +29,9 @@ class LockingTest(unittest.TestCase):
         self.path = tempfile.mktemp()
         open(self.path, 'w').write('hi\n')
 
-    def test_basics(self):
+    # XXX test disabled because it simply doesn't work on many platforms
+    # (Solaris and Irix are known to fail, but Linux works)
+    def xtest_basics(self):
         f = acquire_lock(self.path)
         try:
             acquire_lock(self.path, block=0)
@@ -44,8 +46,13 @@ class LockingTest(unittest.TestCase):
     def tearDown(self):
         os.remove(self.path)
 
-def suite():
-    return unittest.makeSuite(LockingTest)
+def test_suite():
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(LockingTest))
+    return suite
 
+if __name__ == '__main__':
+    runner = unittest.TextTestRunner()
+    unittest.main(testRunner=runner)
 
 # vim: set filetype=python ts=4 sw=4 et si