{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/2189","repository_url":"https://api.github.com/repos/pytest-dev/pytest","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/2189/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/2189/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/2189/events","html_url":"https://github.com/pytest-dev/pytest/issues/2189","id":200265243,"node_id":"MDU6SXNzdWUyMDAyNjUyNDM=","number":2189,"title":"capsys.disabled for stdin","user":{"login":"ikrase","id":1329355,"node_id":"MDQ6VXNlcjEzMjkzNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1329355?v=4","gravatar_id":"","url":"https://api.github.com/users/ikrase","html_url":"https://github.com/ikrase","followers_url":"https://api.github.com/users/ikrase/followers","following_url":"https://api.github.com/users/ikrase/following{/other_user}","gists_url":"https://api.github.com/users/ikrase/gists{/gist_id}","starred_url":"https://api.github.com/users/ikrase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikrase/subscriptions","organizations_url":"https://api.github.com/users/ikrase/orgs","repos_url":"https://api.github.com/users/ikrase/repos","events_url":"https://api.github.com/users/ikrase/events{/privacy}","received_events_url":"https://api.github.com/users/ikrase/received_events","type":"User","site_admin":false},"labels":[{"id":389844119,"node_id":"MDU6TGFiZWwzODk4NDQxMTk=","url":"https://api.github.com/repos/pytest-dev/pytest/labels/plugin:%20capture","name":"plugin: capture","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-01-12T02:47:29Z","updated_at":"2018-12-21T20:00:28Z","closed_at":null,"author_association":"NONE","body":"I'm using pytest 3.0.4\r\n\r\n\r\nCurrently, using capsys.disabled prevents the capturing on stdout. But it does not do anything for stdin, which is also important for my use. (specifically, I want to be able to use input().)\r\n\r\nAdding the -s command line option works, but I'd like to do it programmatically in a test. Ideally, you'd get something like this:\r\n\r\n```Python\r\n    def test_capfd_thing(capfd):\r\n        print(\"this won't be visible\")\r\n        with capsys.disabled():\r\n            print(\"this will be visible.\")\r\n            s = input(\"Type the word potato:\")\r\n            print(\"you said: \"+ s)\r\n        assert 'potato' in s\r\n```\r\n\r\nI'm not sure whether only disabling the capturing of stdout is expected behavior (in which case I would like a way to do what I'm doing above) or a bug. "},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/449485017","html_url":"https://github.com/pytest-dev/pytest/issues/2189#issuecomment-449485017","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/2189","id":449485017,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTQ4NTAxNw==","user":{"login":"bilderbuchi","id":327442,"node_id":"MDQ6VXNlcjMyNzQ0Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/327442?v=4","gravatar_id":"","url":"https://api.github.com/users/bilderbuchi","html_url":"https://github.com/bilderbuchi","followers_url":"https://api.github.com/users/bilderbuchi/followers","following_url":"https://api.github.com/users/bilderbuchi/following{/other_user}","gists_url":"https://api.github.com/users/bilderbuchi/gists{/gist_id}","starred_url":"https://api.github.com/users/bilderbuchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilderbuchi/subscriptions","organizations_url":"https://api.github.com/users/bilderbuchi/orgs","repos_url":"https://api.github.com/users/bilderbuchi/repos","events_url":"https://api.github.com/users/bilderbuchi/events{/privacy}","received_events_url":"https://api.github.com/users/bilderbuchi/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T20:00:28Z","updated_at":"2018-12-21T20:00:28Z","author_association":"CONTRIBUTOR","body":"You're not crazy, I had a related problem in the past (also hardware testing) - there is a way to temporarily suspend capturing: https://github.com/pytest-dev/pytest/issues/4210#issuecomment-449484574"}}
{"actor":{"display_login":"bilderbuchi"}}