def test_one_branch_externals(self):
     """Test that a component source with a branch is correctly parsed.
     """
     config = config_parser()
     self._setup_comp2(config)
     model = ExternalsDescriptionConfigV1(config)
     print(model)
     self._check_comp2(model)
 def test_one_tag_required(self):
     """Test that a component source with a tag is correctly parsed.
     """
     config = config_parser()
     self._setup_comp1(config)
     model = ExternalsDescriptionConfigV1(config)
     print(model)
     self._check_comp1(model)
Beispiel #3
0
 def test_cfg_v1_reject_v1_too_new(self):
     """Test that a v1 description object won't try to parse a v2 file.
     """
     config = config_parser()
     self._setup_comp1(config)
     self._setup_externals_description(config)
     config.set(DESCRIPTION_SECTION, VERSION_ITEM, '1.100.0')
     with self.assertRaises(RuntimeError):
         ExternalsDescriptionConfigV1(config)
Beispiel #4
0
 def test_cfg_v1_reject_unknown_item(self):
     """Test that a v1 description object will reject unknown items
     """
     config = config_parser()
     self._setup_comp1(config)
     self._setup_externals_description(config)
     config.set(self._comp1_name, 'junk', 'foobar')
     with self.assertRaises(RuntimeError):
         ExternalsDescriptionConfigV1(config)
 def test_two_sources(self):
     """Test that multiple component sources are correctly parsed.
     """
     config = config_parser()
     self._setup_comp1(config)
     self._setup_comp2(config)
     model = ExternalsDescriptionConfigV1(config)
     print(model)
     self._check_comp1(model)
     self._check_comp2(model)