def replaced_stdin_objects_dont_explode(self, mock_sys): # Replace sys.stdin with an object lacking .fileno(), which # normally causes an AttributeError unless we are being careful. mock_sys.stdin = object() # Test. If bug is present, this will error. runner = Local(Context()) eq_(runner.should_use_pty(pty=True, fallback=True), False)
def replaced_stdin_objects_dont_explode(self, mock_sys): # Replace sys.stdin with an object lacking .isatty(), which # normally causes an AttributeError unless we are being careful. mock_sys.stdin = object() # Test. If bug is present, this will error. runner = Local(Context()) eq_(runner.should_use_pty(pty=True, fallback=True), False)