def test_git_diff_with_change(self):
    pkg_proj = [p for p in self.ctx.projects if (p.name == 'pkg')][0]
    try:
        with pkg_proj.source_dir.joinpath('pyproject.toml').open('a') as f:
            print('', file=f)
        cmd = LsCommand(self.ctx, since='.')
        with captured_output() as (out, _):
            cmd.run()
        output = out.getvalue().strip()
        self.assertEqual(output, 'pkg@0.1.0')
    finally:
        ChildProcess.run(f'git checkout {pkg_proj.source_dir}')
def test_git_diff_with_change(self):
    pkg_proj = [p for p in self.ctx.projects if (p.name == 'pkg')][0]
    try:
        with pkg_proj.source_dir.joinpath('pyproject.toml').open('a') as f:
            print(, file=f)
        cmd = LsCommand(self.ctx, since='.')
        with captured_output() as (out, _):
            cmd.run()
        output = out.getvalue().strip()
        self.assertEqual(output, 'pkg@0.1.0')
    finally:
        ChildProcess.run(f'git checkout {pkg_proj.source_dir}')