def _isfile_side_effect(path):
 return {'/tmp/foo.tar.gz': True, '/tmp/out': False, '/usr/bin/tar': True, '/bin/tar': True, '/tmp/test_extracted_tar': False}[path]

def _isfile_side_effect ( path ) : return { '/tmp/foo.tar.gz' : True , '/tmp/out' : False , '/usr/bin/tar' : True , '/bin/tar' : True , '/tmp/test_extracted_tar' : False } [ path ]
magicmock side_effect for os .