diff options
Diffstat (limited to 'Lib/test/test_commands.py')
| -rw-r--r-- | Lib/test/test_commands.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_commands.py b/Lib/test/test_commands.py index dc1a598..5cb6e86 100644 --- a/Lib/test/test_commands.py +++ b/Lib/test/test_commands.py @@ -4,13 +4,11 @@ ''' import unittest import os, tempfile, re -import warnings -warnings.filterwarnings('ignore', r".*commands.getstatus.. is deprecated", - DeprecationWarning) +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 import_module('commands', deprecated=True) from commands import * @@ -60,7 +58,11 @@ class CommandTests(unittest.TestCase): /\. # and end with the name of the file. ''' - self.assert_(re.match(pat, getstatus("/."), re.VERBOSE)) + with check_warnings((".*commands.getstatus.. is deprecated", + DeprecationWarning), + ("in 3.x, mkarg has been removed", + DeprecationWarning),): + self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE)) def test_main(): |
