From dac9acedfd9930d2368172c2cec13b6077153a70 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 25 May 2011 09:33:37 -0500 Subject: [PATCH] test that object has a __dir__() implementation --- Lib/test/test_builtin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index b094a65f248..97619cf9ef4 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -385,6 +385,8 @@ class BuiltinTest(unittest.TestCase): except: self.assertEqual(len(dir(sys.exc_info()[2])), 4) + # test that object has a __dir__() + self.assertEqual(sorted([].__dir__()), dir([])) def test_divmod(self): self.assertEqual(divmod(12, 7), (1, 5))