Coverage for tests/test_ordering.py: 30%
Shortcuts 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
Shortcuts 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
1# This file is part of utils.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# Use of this source code is governed by a 3-clause BSD-style
10# license that can be found in the LICENSE file.
12import unittest
13import lsst.utils.tests
16class TestCaseOrdering(lsst.utils.tests.TestCase):
17 def testTestOrdering(self):
18 class DummyTest(lsst.utils.tests.TestCase):
19 def noOp(self):
20 pass
22 class DummyMemoryTest(lsst.utils.tests.MemoryTestCase):
23 pass
25 class DummyTest2(unittest.TestCase):
26 def noOp(self):
27 pass
29 suite = unittest.defaultTestLoader.suiteClass([DummyTest2("noOp"),
30 DummyMemoryTest("testFileDescriptorLeaks"),
31 DummyTest("noOp")])
33 self.assertNotIsInstance(suite._tests[0], lsst.utils.tests.MemoryTestCase)
34 self.assertIsInstance(suite._tests[-1], lsst.utils.tests.MemoryTestCase)
37if __name__ == "__main__": 37 ↛ 38line 37 didn't jump to line 38, because the condition on line 37 was never true
38 unittest.main()