Coverage for tests / test_analysis_tools.py: 50%
24 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-30 09:28 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-30 09:28 +0000
1# This file is part of meas_extensions_multiprofit.
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 pytest
24try:
25 from lsst.meas.extensions.multiprofit.analysis_tools import MultiProFitSersicSizeMagnitudePlot
27 has_analysis_tools = True
28except ImportError:
29 has_analysis_tools = False
31if has_analysis_tools: 31 ↛ exitline 31 didn't exit the module because the condition on line 31 was always true
33 @pytest.fixture(scope="module")
34 def kwargs_plot():
35 kwargs = dict(
36 xLims=(18, 25),
37 yLims=(-3, 4),
38 )
39 return kwargs
41 @pytest.fixture(scope="module")
42 def tool_sersic(kwargs_plot):
43 atool = MultiProFitSersicSizeMagnitudePlot()
44 atool.finalize()
45 return atool
47 @pytest.fixture(scope="module")
48 def data_sersic(tool_sersic):
49 schema = tool_sersic.getInputSchema()
50 data = {key: [] for key in schema}
51 return data
53 def test_psf_fits(tool_sersic, data_sersic):
54 assert tool_sersic is not None
55 assert len(data_sersic) > 0