diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_descrtut.py | 10 | ||||
-rw-r--r-- | Lib/test/test_traceback.py | 8 |
2 files changed, 1 insertions, 17 deletions
diff --git a/Lib/test/test_descrtut.py b/Lib/test/test_descrtut.py index 5b11666..fe29f34 100644 --- a/Lib/test/test_descrtut.py +++ b/Lib/test/test_descrtut.py @@ -162,15 +162,7 @@ For instance of built-in types, x.__class__ is now the same as type(x): True >>> -Under the new proposal, the __methods__ attribute no longer exists: - - >>> [].__methods__ - Traceback (most recent call last): - File "<stdin>", line 1, in ? - AttributeError: 'list' object has no attribute '__methods__' - >>> - -Instead, you can get the same information from the list type: +You can get the information from the list type: >>> pprint.pprint(dir(list)) # like list.__dict__.keys(), but sorted ['__add__', diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 5cd300a..84d7290 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -52,14 +52,6 @@ class TracebackCases(unittest.TestCase): self.assert_("^" in err[2]) self.assertEqual(err[1].find(")"), err[2].find("^")) - def test_members(self): - # Covers Python/structmember.c::listmembers() - try: - 1/0 - except: - import sys - sys.exc_info()[2].__members__ - def test_base_exception(self): # Test that exceptions derived from BaseException are formatted right e = KeyboardInterrupt() |