Improve the test of pinned packages