def get_seeds_from_cache(testdir, salt):
    """Run ``pytest --cache-show`` and parse the outcome to get cached seeds."""

    result = testdir.runpytest("--cache-show")
    fmt = "test_seed[{param}]:{salt} contains:"

    ix_a = result.outlines.index(fmt.format(param="a", salt=salt))
    seed_a = int(result.outlines[ix_a + 1].strip())

    ix_b = result.outlines.index(fmt.format(param="b", salt=salt))
    seed_b = int(result.outlines[ix_b + 1].strip())

    return seed_a, seed_b