Coverage for tests / test_compute_object_epochs.py: 57%
19 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-23 08:56 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-23 08:56 +0000
1# This file is part of drp_tasks.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <https://www.gnu.org/licenses/>.
22import unittest
24import astropy.table
25import numpy as np
27import lsst.utils.tests
28from lsst.drp.tasks.compute_object_epochs import ComputeObjectEpochsConfig, ComputeObjectEpochsTask
31class ComputeObjectEpochsTestCase(lsst.utils.tests.TestCase):
32 def test_computeObjectEpochs(self):
33 """Test basic MakePsfMatchedWarpTask
35 This constructs a direct_warp using `MakeDirectWarpTask` and then
36 runs `MakePsfMatchedWarpTask` on it.
37 """
38 cat = astropy.table.Table(
39 {
40 "id": np.arange(5),
41 "ra": np.full(5, np.nan),
42 "dec": np.full(5, np.nan),
43 }
44 )
46 bands = ("g", "r")
48 task = ComputeObjectEpochsTask(config=ComputeObjectEpochsConfig(bands=bands))
49 # TODO: DM-46202 Pass at least one healSparseMap if this task remains.
50 result = task.computeEpochs(cat, {})
52 self.assertListEqual(result.colnames, ["objectId"] + [f"{band}_epoch" for band in bands])
55class MemoryTester(lsst.utils.tests.MemoryTestCase):
56 pass
59def setup_module(module):
60 lsst.utils.tests.init()
63if __name__ == "__main__": 63 ↛ 64line 63 didn't jump to line 64 because the condition on line 63 was never true
64 lsst.utils.tests.init()
65 unittest.main()