コード例 #1
0
 def xsType(self, value):  # pylint: disable=method-hidden
     self._p_xsType = value  # pylint: disable=attribute-defined-outside-init
     self._p_xsTypeNum = crossSectionGroupManager.getXSTypeNumberFromLabel(
         value
     )  # pylint: disable=attribute-defined-outside-init
     xsTypeNumDef = parameters.ALL_DEFINITIONS["xsTypeNum"]
     xsTypeNumDef.assigned = parameters.SINCE_ANYTHING
コード例 #2
0
 def test_conversion_2digit(self):
     label = crossSectionGroupManager.getXSTypeLabelFromNumber(6570)
     self.assertEqual(label, "AF")
     num = crossSectionGroupManager.getXSTypeNumberFromLabel("ZZ")
     self.assertEqual(num, 9090)
コード例 #3
0
 def test_conversion(self):
     label = crossSectionGroupManager.getXSTypeLabelFromNumber(65)
     self.assertEqual(label, "A")
     num = crossSectionGroupManager.getXSTypeNumberFromLabel("A")
     self.assertEqual(num, 65)