Coverage for tests/test_load.py: 48%
21 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-14 11:39 -0700
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-14 11:39 -0700
2import os.path
3import unittest
5from lsst.ctrl.execute import envString
6from lsst.ctrl.execute.allocationConfig import AllocationConfig
7from lsst.ctrl.execute.condorConfig import CondorConfig
9TESTDIR = os.path.abspath(os.path.dirname(__file__))
12class S3DFSimpleTestCase(unittest.TestCase):
13 """Test basic configuration reading."""
15 def test_exec_config(self):
16 exec_config_name = os.path.join(TESTDIR, os.pardir, "etc", "config", "execConfig.py")
18 resolved_name = envString.resolve(exec_config_name)
19 configuration = CondorConfig()
20 configuration.load(resolved_name)
21 self.assertEqual(configuration.platform.scheduler, "slurm")
23 def test_allocation_config(self):
24 slurm_config_name = os.path.join(TESTDIR, os.pardir, "etc", "config", "slurmConfig.py")
26 resolved_name = envString.resolve(slurm_config_name)
27 configuration = AllocationConfig()
28 configuration.load(resolved_name)
29 self.assertEqual(configuration.platform.queue, "$QUEUE")
32if __name__ == "__main__": 32 ↛ 33line 32 didn't jump to line 33, because the condition on line 32 was never true
33 unittest.main()