Project: datamanagement
Issue DM-3347: assertWcsNearlyEqualOverBBox and friends is too hard to use as a free function
assertWcsNearlyEqualOverBBox and similar functions elsewhere in afw were written to be methods of lsst.utils.tests.TestCase, so their first argument is a testCase. This is fine for use in unit tests, but a hassle to use as free functions because the user must provide a testCase argument (though it need only be a trivial class with a fail(self, msgStr) method). Worse, that minimal requirement is not documented, so technically providing a simple mock test case is unsafe. I have two proposals: - Document the fact that testCase need only support fail(self, msgStr). This makes it clear how to safely use these functions as free functions. - Allow testCase to be None, in which case RuntimeError is raised. That makes these functions even easier to use as free functions.
Story points: 1