diff --git a/python/lsst/summit/extras/logUtils.py b/python/lsst/summit/extras/logUtils.py index ded5156..83c987d 100644 --- a/python/lsst/summit/extras/logUtils.py +++ b/python/lsst/summit/extras/logUtils.py @@ -208,7 +208,7 @@ def _getFailDataRefs(self) -> list[dafButler.DatasetRef]: fails.append(dataRef) return fails - def _printLineIf(self, logLine: dafButler.ButlerLogRecord) -> None: + def _printLineIf(self, logLine: dafButler.logging.ButlerLogRecord) -> None: """Print the line if the name of the logger isn't in IGNORE_LOGS_FROM. Parameters @@ -225,7 +225,7 @@ def _printLineIf(self, logLine: dafButler.ButlerLogRecord) -> None: self._printFormattedLine(logLine) @staticmethod - def _printFormattedLine(logLine: dafButler.ButlerLogRecord) -> None: + def _printFormattedLine(logLine: dafButler.logging.ButlerLogRecord) -> None: """Print the line, formatted as it would be for a normal task. Parameters diff --git a/tests/test_logUtils.py b/tests/test_logUtils.py new file mode 100644 index 0000000..3916e82 --- /dev/null +++ b/tests/test_logUtils.py @@ -0,0 +1,40 @@ +# This file is part of summit_extras. +# +# Developed for the LSST Data Management System. +# This product includes software developed by the LSST Project +# (https://www.lsst.org). +# See the COPYRIGHT file at the top-level directory of this distribution +# for details of code ownership. +# +# 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 GNU General Public License +# along with this program. If not, see . + +import unittest + +import lsst.utils.tests + +# for now, just check that the import isn't broken until we have some test logs +from lsst.summit.extras.logUtils import LogBrowser # noqa: F401 + + +class TestMemory(lsst.utils.tests.MemoryTestCase): + pass + + +def setup_module(module): + lsst.utils.tests.init() + + +if __name__ == "__main__": + lsst.utils.tests.init() + unittest.main()