Fix deprecation warnings in test_commands.py
authorEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 08:32:53 +0000 (08:32 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Tue, 3 Aug 2010 08:32:53 +0000 (08:32 +0000)
Lib/test/test_commands.py

index 827f1084d1484a03fea80a73483e2eee6bfe87e0..a539c243fe5b8b29908d4c85f87d4c91d7275467 100644 (file)
@@ -5,8 +5,8 @@
 import unittest
 import os, tempfile, re
 
-from test.test_support import run_unittest, reap_children, import_module, \
-                              check_warnings
+from test.test_support import (run_unittest, reap_children, import_module,
+                               check_warnings)
 
 from test.test_support import TestSkipped, run_unittest, reap_children, import_module
 # Silence Py3k warning
@@ -57,8 +57,8 @@ class CommandTests(unittest.TestCase):
                   [^/]*        # Skip user, group, size, and date.
                   /\.          # and end with the name of the file.
                '''
-
-        self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE))
+        with check_warnings(quiet=True):
+            self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE))
 
 
 def test_main():