Skip to content

Commit 90d29e8

Browse files
qunaibitsteve-s
authored andcommitted
Add tests
1 parent 08dd692 commit 90d29e8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_object.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ def test_inheret_numbers_slots(self):
305305
assert X.B_has_add_slot()
306306
assert Y.E_has_add_slot()
307307

308+
# check dir & __dir__
309+
assert sorted(list(B.__dir__())) == dir(B)
310+
308311
def test_managed_class_with_native_base(self):
309312
NativeModule = CPyExtType("NativeModule_",
310313
'''

graalpython/com.oracle.graal.python.test/src/tests/test_object.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def __init__(self):
104104
assert "d" in m.__dict__
105105
assert m.__dict__ == {'a': 10, 'd': 20}
106106

107+
# check dir & __dir__
108+
assert sorted(list(m.__dir__())) == dir(m)
107109

108110
def test_set_attr_builtins():
109111
lst = list()

0 commit comments

Comments
 (0)