Skip to content

Commit 0809e12

Browse files
add failing test for running descriptor attributes
1 parent a5982a7 commit 0809e12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bpython/test/test_autocomplete.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ def __getattr__(self, attr):
274274
self.assertIn(u'a.__module__',
275275
self.com.matches(4, 'a.__', locals_=locals_))
276276

277+
def test_descriptor_attributes_not_run(self):
278+
com = autocomplete.AttrCompletion()
279+
self.assertSetEqual(com.matches(2, 'a.', locals_={'a': Properties()}),
280+
set(['a.asserts_when_called']))
281+
277282

278283
class TestArrayItemCompletion(unittest.TestCase):
279284
@classmethod

0 commit comments

Comments
 (0)