Coverage for tests/test_all.py: 67%
13 statements
« prev ^ index » next coverage.py v7.3.3, created at 2023-12-20 16:21 +0000
« prev ^ index » next coverage.py v7.3.3, created at 2023-12-20 16:21 +0000
1#
2# LSST Data Management System
3# Copyright 2008, 2009, 2010 LSST Corporation.
4#
5# This product includes software developed by the
6# LSST Project (http://www.lsst.org/).
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the LSST License Statement and
19# the GNU General Public License along with this program. If not,
20# see <http://www.lsstcorp.org/LegalNotices/>.
21#
23"""
24Tests for sconsUtils
26Run with:
27 python test_all.py
28or by typing
29 pytest
30"""
32import os
33import subprocess
34import unittest
37class SconsUtilsTestCase(unittest.TestCase):
38 """A test case for sconsUtils"""
40 def setUp(self):
41 pass
43 def tearDown(self):
44 pass
46 def testCheckErrorCode(self):
47 self.assertTrue(
48 subprocess.call(
49 f"""
50 cd "{os.path.dirname(__file__)}/testFailedTests"
51 scons > /dev/null 2>&1
52 """,
53 shell=True,
54 ),
55 "Failed to detect failed tests",
56 )
59if __name__ == "__main__": 59 ↛ 60line 59 didn't jump to line 60, because the condition on line 59 was never true
60 unittest.main()