summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-05-25 14:33:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-05-25 14:33:37 (GMT)
commitdac9acedfd9930d2368172c2cec13b6077153a70 (patch)
tree49c079e03aa8f7b03fbd098154e8dc89294f4605 /Lib/test/test_builtin.py
parent04778a8150430edc2c441f2f86193ca690d60aa3 (diff)
downloadcpython-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.py2
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))