diff options
author | Georg Brandl <georg@python.org> | 2008-03-21 20:21:46 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-03-21 20:21:46 (GMT) |
commit | 07e5681fd3a8c7169f569f6b70aa824f203f89d9 (patch) | |
tree | 8922fd314337ae4d1f61bb9babc15f41418c12ba /Lib/test/test_py3kwarn.py | |
parent | 5a44424c5e6b9533b12773fadeaf436903ca855e (diff) | |
download | cpython-07e5681fd3a8c7169f569f6b70aa824f203f89d9.zip cpython-07e5681fd3a8c7169f569f6b70aa824f203f89d9.tar.gz cpython-07e5681fd3a8c7169f569f6b70aa824f203f89d9.tar.bz2 |
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
Diffstat (limited to 'Lib/test/test_py3kwarn.py')
-rw-r--r-- | Lib/test/test_py3kwarn.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index aaa1623..f030af0 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -99,6 +99,16 @@ class TestPy3KWarnings(unittest.TestCase): with catch_warning() as w: self.assertWarning(sys.exc_clear(), w, expected) + def test_methods_members(self): + expected = '__members__ and __methods__ not supported in 3.x' + class C: + __methods__ = ['a'] + __members__ = ['b'] + c = C() + with catch_warning() as w: + self.assertWarning(dir(c), w, expected) + + def test_main(): run_unittest(TestPy3KWarnings) |