diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-05-25 14:33:37 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-05-25 14:33:37 (GMT) |
commit | dac9acedfd9930d2368172c2cec13b6077153a70 (patch) | |
tree | 49c079e03aa8f7b03fbd098154e8dc89294f4605 /Lib/test/test_builtin.py | |
parent | 04778a8150430edc2c441f2f86193ca690d60aa3 (diff) | |
download | cpython-dac9acedfd9930d2368172c2cec13b6077153a70.zip cpython-dac9acedfd9930d2368172c2cec13b6077153a70.tar.gz cpython-dac9acedfd9930d2368172c2cec13b6077153a70.tar.bz2 |
test that object has a __dir__() implementation
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r-- | Lib/test/test_builtin.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index b094a65..97619cf 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)) |