We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b90bf37 commit d036526Copy full SHA for d036526
tests/python/test_objects.py
@@ -148,3 +148,15 @@ def __init__(self):
148
149
o = MyClass()
150
assert '[object Object]' == pm.eval("(obj) => { return obj.toLocaleString(); }")(o)
151
+
152
153
+def test_toPrimitive_iterable():
154
+ iterable = iter([1,2])
155
+ toPrimitive = pm.eval("(obj) => { return obj[Symbol.toPrimitive]; }")(iterable)
156
+ assert repr(toPrimitive).__contains__("<pythonmonkey.JSFunctionProxy object at")
157
158
159
+def test_constructor_iterable():
160
161
+ toPrimitive = pm.eval("(obj) => { return obj.constructor; }")(iterable)
162
0 commit comments