def _checkDoRefcats(self, doAstrometry, doPhotoCal, ids): """Test whether run is called with the correct arguments. In the case of `CalibrateTask`, the inputs should not depend on the task configuration. Parameters ---------- doAstrometry, doPhotoCal : `bool` Values of the config flags of the same name. ids : `dict` [`str`] A mapping from the input dataset type to the data ID of the dataset to process. """ config = CalibrateConfig() config.doWriteMatches = False # no real output to write config.doAstrometry = doAstrometry config.doPhotoCal = doPhotoCal config.connections.photoRefCat = "cal_ref_cat" config.connections.astromRefCat = "cal_ref_cat" task = CalibrateTask(config=config) quantumId = ids["exposure"] quantum = testUtils.makeQuantum(task, self.butler, quantumId, ids) run = testUtils.runTestQuantum(task, self.butler, quantum) run.assert_called_once() self.assertEqual(run.call_args[0], ()) # Some arguments unprintable because we don't have a full environment # So just check which ones were passed in self.assertEqual( run.call_args[1].keys(), {"exposure", "exposureIdInfo", "background", "icSourceCat"})