def tear_down_repo(repo):
 repo.close()
 temp_dir = os.path.dirname(repo.path.rstrip(os.sep))
 shutil.rmtree(temp_dir)

def tear_down_repo ( repo ) : repo . close ( ) temp_dir = os . path . dirname ( repo . path . rstrip ( os . sep ) ) shutil . rmtree ( temp_dir )
tear down a test repository .