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 6746741 commit 671320aCopy full SHA for 671320a
tests/python/test_objects.py
@@ -174,11 +174,12 @@ def test_constructor_stdin():
174
assert repr(constructor).__contains__("<pythonmonkey.JSFunctionProxy object at")
175
176
177
-def test_stdin_tty_console_printing():
+def test_iterable_member_console_printing():
178
temp_out = StringIO()
179
sys.stdout = temp_out
180
obj = {}
181
- obj['stdin'] = sys.stdin
+ obj['stdin'] = sys.stdin # sys.stdin is iterable
182
+ assert hasattr(sys.stdin, '__iter__') == True
183
obj['stdin'].isTTY = sys.stdin.isatty()
184
pm.eval('''(function iife(obj){console.log(obj['stdin'].isTTY);})''')(obj)
185
assert temp_out.getvalue() == "\x1b[33mfalse\x1b[39m\n"
0 commit comments