summaryrefslogtreecommitdiff
path: root/Lib/test/test_py3kwarn.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-26 19:41:53 +0000
committerBenjamin Peterson <benjamin@python.org>2008-05-26 19:41:53 +0000
commit3aa84a7f28659cfbed312e352775b32d2a58005b (patch)
treedbf35ab7618666913f26a95a44fd1c51d7d3c93d /Lib/test/test_py3kwarn.py
parentb17ad2de08f1d31767255879664ba671cb20f000 (diff)
downloadcpython-git-3aa84a7f28659cfbed312e352775b32d2a58005b.tar.gz
warn about some members of the commands module
Diffstat (limited to 'Lib/test/test_py3kwarn.py')
-rw-r--r--Lib/test/test_py3kwarn.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 180342b3d0..d5574f499c 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -212,6 +212,15 @@ class TestStdlibRemovals(unittest.TestCase):
mod.walk(".", dumbo, None)
self.assertEquals(str(w.message), msg)
+ def test_commands_members(self):
+ import commands
+ members = {"mk2arg" : 2, "mkarg" : 1, "getstatus" : 1}
+ for name, arg_count in members.items():
+ with catch_warning(record=False):
+ warnings.filterwarnings("error")
+ func = getattr(commands, name)
+ self.assertRaises(DeprecationWarning, func, *([None]*arg_count))
+
def test_main():
run_unittest(TestPy3KWarnings,