def test_successful_refresh_with_same_arg_invalidates_cached_version_info(self):
        """Changing git at the same path and refreshing affects version_info."""
        with _rollback_refresh():
            with _fake_git(11, 111, 1) as path1:
                with _fake_git(22, 222, 2) as path2:
                    new_git = Git()
                    refresh(path1)
                    new_git.version_info
                    shutil.copy(path2, path1)
                    refresh(path1)  # The fake git at path1 has a different version now.
                    self.assertEqual(new_git.version_info, (22, 222, 2))
Changing git at the same path and refreshing affects version_info.
test/test_git.py