Created
April 30, 2016 13:37
-
-
Save g-fukurowl/bd5732e6a5bfa0279b3a8d7e4414e818 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def hoge(): | |
| print "hoge" | |
| def test_hoge(capsys): | |
| hoge() | |
| out, err = capsys.readouterr() | |
| assert out == "hoge\n" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to test printing onto stdout with py.test.
For more detail, read http://pytest.org/latest-ja/capture.html#id3