jointcal's PerTractCcdDataIdContainer doesn't have any tests, so its exact behavior given various inputs is not entirely clear. We should add some tests for it using some fake visit/tract combinations: list of visits all in a tract; list of tracts with no visits; list of visits in different tracts, would be a good start.
As part of this, we should explore merging the existing versions of this code into one, so that the code and tests only live in one package (possibly pipe_base? Or maybe daf_butler?). Possibilities to include in this unification include:
This should wait for Gen3 Butler, as that will eliminate the "Reading WCS to determine tracts" part of the code, since making up fake WCSs would make writing the test much harder.