diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-14 17:53:54 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-14 17:53:54 (GMT) |
commit | 3eed76522389d55248a71aa8c83203aa3ae0873b (patch) | |
tree | 9a52b1a1b21046fafcc54736ef173e1cfc8fe8d1 /Lib/test | |
parent | ee634a4013ff6321aecd132498721ebfb734a4cc (diff) | |
download | cpython-3eed76522389d55248a71aa8c83203aa3ae0873b.zip cpython-3eed76522389d55248a71aa8c83203aa3ae0873b.tar.gz cpython-3eed76522389d55248a71aa8c83203aa3ae0873b.tar.bz2 |
Bug #1772489: make dir() work on traceback objects again.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_builtin.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index b430822..b3e4733 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -283,6 +283,13 @@ class BuiltinTest(unittest.TestCase): f = Foo() self.assertRaises(TypeError, dir, f) + # dir(traceback) + try: + raise IndexError + except: + self.assertEqual(len(dir(sys.exc_info()[2])), 4) + + def test_divmod(self): self.assertEqual(divmod(12, 7), (1, 5)) self.assertEqual(divmod(-12, 7), (-2, 2)) |