@with_fakes
def test_fastprint_calls_puts():
 text = 'Some output'
 fake_puts = Fake('puts', expect_call=True).with_args(text=text, show_prefix=False, end='', flush=True)
 with patched_context(utils, 'puts', fake_puts):
  fastprint(text)

@ with_fakes def test_fastprint_calls_puts ( ) : text = 'Some output' fake_puts = Fake ( 'puts' , expect_call = True ) . with_args ( text = text , show_prefix = False , end = '' , flush = True ) with patched_context ( utils , 'puts' , fake_puts ) : fastprint ( text )
fastprint() is just an alias to puts() .