Coverage for tests/test_display.py : 89%
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 2015 LSST Corporation. # # 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 <http://www.lsstcorp.org/LegalNotices/>. #
Tests for displaying devices
Run with: display.py [backend] or python >>> import display >>> display.backend = "ds9" # optional >>> display.run() """
"""A test case for Display"""
global oldBackend
dirName, "data", "HSC-0908120-056-small.fits")
"""Test basic image display"""
"""Test basic image display"""
"""Test using displays with with statement"""
"""Test that we can do things with two frames"""
""" Un-iconise and raise the display to the top of the stacking order if appropriate"""
"""Test drawing lines and glyphs"""
# tells display0 about the image's xy0
(214, 220), (200, 220)]
"""Test playing with the lookup table"""
"""Demonstrate the utility routine to generate mask plane colours (used by e.g. the ds9 implementation of _mtv)"""
"""Check that we can display a range of types of image""" afwImage.ExposureF, afwImage.ImageU, afwImage.ImageI, afwImage.ImageF, afwImage.MaskedImageF, ]:
"""Check that interact exits when a q, \c CR, or \c ESC is pressed, or if a callback function returns a ``True`` value. If this is run using the virtualDevice a "q" is automatically triggered. If running the tests using ds9 you will be expected to do this manually. """
"""Test that we can return mask colours either as a dict or maskplane by maskplane """
"""Test that we can close devices."""
import argparse import sys
parser = argparse.ArgumentParser( description="Run the image display test suite")
parser.add_argument('backend', type=str, nargs="?", default="virtualDevice", help="The backend to use, e.g. ds9. You may need to have the device setup") args = parser.parse_args()
# check that that backend is valid with afwDisplay.Display("test", backend=args.backend) as disp: pass
backend = args.backend # backend is just a variable in this file lsst.utils.tests.init() del sys.argv[1:] unittest.main() |