Coverage for tests/test_all.py: 67%

13 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-07-14 19:01 +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# 

22 

23""" 

24Tests for sconsUtils 

25 

26Run with: 

27 python test_all.py 

28or by typing 

29 pytest 

30""" 

31 

32import os 

33import subprocess 

34import unittest 

35 

36 

37class SconsUtilsTestCase(unittest.TestCase): 

38 """A test case for sconsUtils""" 

39 def setUp(self): 

40 pass 

41 

42 def tearDown(self): 

43 pass 

44 

45 def testCheckErrorCode(self): 

46 self.assertTrue(subprocess.call(""" 

47 cd "%s/testFailedTests" 

48 scons > /dev/null 2>&1 

49 """ % os.path.dirname(__file__), shell=True), 

50 "Failed to detect failed tests") 

51 

52 

53if __name__ == "__main__": 53 ↛ 54line 53 didn't jump to line 54, because the condition on line 53 was never true

54 unittest.main()