Coverage for tests/test_basics.py : 35%

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
# This file is part of astro_metadata_translator. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (http://www.lsst.org). # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICENSE file.
version = astro_metadata_translator.__version__ self.assertIsNotNone(version)
"""Test construction of ObservationInfo without header.""" obsinfo = makeObservationInfo(boresight_airmass=1.5, tracking_radec=None) self.assertIsInstance(obsinfo, ObservationInfo) self.assertIsNone(obsinfo.tracking_radec) self.assertAlmostEqual(obsinfo.boresight_airmass, 1.5) self.assertIsNone(obsinfo.observation_id) self.assertEqual(obsinfo.cards_used, set()) self.assertEqual(obsinfo.stripped_header(), {})
with self.assertRaises(TypeError): ObservationInfo.makeObservationInfo(boresight_airmass=1.5, observation_id=5)
with self.assertRaises(KeyError): obsinfo = ObservationInfo.makeObservationInfo(unrecognized=1.5, keys="unknown")
unittest.main() |