Coverage for tests/test_decorators.py : 47%

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
# # 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 <https://www.gnu.org/licenses/>. #
word=["one", "two", "three", "four"], length=[3, 3, 5, 4] ) self.numCalls = 0
self.assertEqual(len(self.word), self.length) self.assertEqual(self.__class__.__name__, f"DecoratorTestCase_{self.word}_{self.length}")
xx=[1, 2, 3], yy=[9, 8, 7], ) def testMethodDecorator(self, xx, yy): self.assertEqual(xx + yy, 10) self.numCalls += 1
if method.__name__ == "testMethodDecorator": self.assertEqual(self.numCalls, 3)
world = globals() assert "DecoratorTestCase_one_3" in world assert "DecoratorTestCase_two_3" in world assert "DecoratorTestCase_three_5" in world assert "DecoratorTestCase_four_4" in world
lsst.utils.tests.init()
module = sys.modules[__name__] setup_module(module) testDecorators() unittest.main() |