(capfd)
| 193 | |
| 194 | |
| 195 | def test_err(capfd): |
| 196 | msg = "Something that should not show up in log" |
| 197 | stream = StringIO() |
| 198 | with redirect_stderr(stream): |
| 199 | m.raw_err(msg) |
| 200 | stdout, stderr = capfd.readouterr() |
| 201 | assert not stdout |
| 202 | assert stderr == msg |
| 203 | assert not stream.getvalue() |
| 204 | |
| 205 | stream = StringIO() |
| 206 | with redirect_stderr(stream): |
| 207 | m.captured_err(msg) |
| 208 | stdout, stderr = capfd.readouterr() |
| 209 | assert not stdout |
| 210 | assert not stderr |
| 211 | assert stream.getvalue() == msg |
| 212 | |
| 213 | |
| 214 | def test_multi_captured(capfd): |
nothing calls this directly
no outgoing calls
no test coverage detected