Exemplo n.º 1
0
 def test_cladding_invalid(self):
     """Make sure cladding input components are flagged as invalid."""
     bad = {
         "name": "cladding",
         "shape": "Circle",
         "material": "HT9",
         "Tinput": 1.0,
         "Thot": 1.0,
     }
     with self.assertRaises(yamlize.YamlizingError):
         ComponentBlueprint.load(repr(bad))
Exemplo n.º 2
0
 def test_components(self):
     bads = [
         # bad shape
         {
             "shape": "potato",
             "name": "name",
             "material": "HT9",
             "Tinput": 1.0,
             "Thot": 1.0,
         },
         # bad merge
         {
             "shape": "circle",
             "name": "name",
             "material": "HT9",
             "Tinput": 1.0,
             "Thot": 1.0,
             "mergeWith": 6,
         },
         # bad isotopics
         {
             "shape": "circle",
             "name": "name",
             "material": "HT9",
             "Tinput": 1.0,
             "Thot": 1.0,
             "isotopics": 4,
         },
         # bad key
         {
             "shape": "circle",
             "name": "name",
             "material": "HT9",
             "Tinput": 1.0,
             "Thot": 1.0,
             5: "od",
         },
         # bad linked dimension
         {
             "shape": "circle",
             "name": "name",
             "material": "HT9",
             "Tinput": 1.0,
             "Thot": 1.0,
             "mult": "potato,mult",
         },
     ]
     for bad in bads:
         with self.assertRaises(yamlize.YamlizingError):
             ComponentBlueprint.load(repr(bad))