File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11import pythonmonkey as pm
2+ import sys
23
34
45def test_eval_pyobjects ():
@@ -158,5 +159,15 @@ def test_toPrimitive_iterable():
158159
159160def test_constructor_iterable ():
160161 iterable = iter ([1 ,2 ])
161- toPrimitive = pm .eval ("(obj) => { return obj.constructor; }" )(iterable )
162- assert repr (toPrimitive ).__contains__ ("<pythonmonkey.JSFunctionProxy object at" )
162+ constructor = pm .eval ("(obj) => { return obj.constructor; }" )(iterable )
163+ assert repr (constructor ).__contains__ ("<pythonmonkey.JSFunctionProxy object at" )
164+
165+
166+ def test_toPrimitive_stdin ():
167+ toPrimitive = pm .eval ("(obj) => { return obj[Symbol.toPrimitive]; }" )(sys .stdin )
168+ assert repr (toPrimitive ).__contains__ ("<pythonmonkey.JSFunctionProxy object at" )
169+
170+
171+ def test_constructor_stdin ():
172+ constructor = pm .eval ("(obj) => { return obj.constructor; }" )(sys .stdin )
173+ assert repr (constructor ).__contains__ ("<pythonmonkey.JSFunctionProxy object at" )
You can’t perform that action at this time.
0 commit comments