summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_py3kwarn.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-21 20:21:46 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-21 20:21:46 (GMT)
commit07e5681fd3a8c7169f569f6b70aa824f203f89d9 (patch)
tree8922fd314337ae4d1f61bb9babc15f41418c12ba /Lib/test/test_py3kwarn.py
parent5a44424c5e6b9533b12773fadeaf436903ca855e (diff)
downloadcpython-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.py10
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)