Coverage for tests/test_flaghandler.py : 92%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # LSST Data Management System # # Copyright 2008-2016 AURA/LSST. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <https://www.lsstcorp.org/LegalNotices/>. #
""" Return the character(s) used as delimeters within the given schema.
Should be "_" in the current afw.table implementation. This functionality is not otherwise exposed to Python. """
"""Test the FlagHandler used for Kron photometry"""
""" Check flag order.
Flags must be added to the flag handler in the same order that they are defined in the algorithm. """
# Add the output fields -- including flags -- to the schema.
# Fetch a list of all flag fields, in the order that they were added # to the schema (and hence the order they were added to the FlagHandler) # Iterate over each flag field, checking that they were enumerated in # the algorithm in the same order as in the FlagHandler. # The generic "failure" flag is written into the schema as $name_flag. else: # Other flags are referenced by name. We assert that the # enumeration name (e.g. BAD_RADIUS) is an upper-case version # of the schema field name (e.g. flag_bad_radius), with the # "flag_" prefix stripped.
# Check that the number of enumerated flags matches the number of flag # fields in the schema.
lsst.utils.tests.init() unittest.main() |