@mock_streams('stdout')
@with_patched_input(p)
def test_prompt_appends_space():
 s = 'This is my prompt'
 prompt(s)
 eq_(sys.stdout.getvalue(), (s + ' '))

@ mock_streams ( 'stdout' ) @ with_patched_input ( p ) def test_prompt_appends_space ( ) : s = 'This is my prompt' prompt ( s ) eq_ ( sys . stdout . getvalue ( ) , ( s + ' ' ) )
prompt() appends a single space when no default is given .