[lang-ref] ( print_with_newline ) ( python )

def test_print_with_newline(capsys):
    print('message')
    captured = capsys.readouterr()
    assert captured.out == 'message\n'