def test_cd_prefix():
 some_path = '~/somepath'
 with cd(some_path):
  command_out = _prefix_commands('foo', 'remote')
  eq_(command_out, ('cd %s >/dev/null && foo' % some_path))

def test_cd_prefix ( ) : some_path = '~/somepath' with cd ( some_path ) : command_out = _prefix_commands ( 'foo' , 'remote' ) eq_ ( command_out , ( 'cd %s >/dev/null && foo' % some_path ) )
cd prefix should direct output to /dev/null in case of cdpath .