'Unit test for get_unstaged_changes.'

def test_get_unstaged_deleted_changes(self):

    repo_dir = tempfile.mkdtemp()
    self.addCleanup(shutil.rmtree, repo_dir)
    with Repo.init(repo_dir) as repo:
        foo1_fullpath = os.path.join(repo_dir, 'foo1')
        with open(foo1_fullpath, 'wb') as f:
            f.write('origstuff')
        repo.stage(['foo1'])
        repo.do_commit('test    status', author='', committer='')
        os.unlink(foo1_fullpath)
        changes = get_unstaged_changes(repo.open_index(), repo_dir)
        self.assertEqual(list(changes), ['foo1'])
