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
def test_conversion_2digit(self): label = crossSectionGroupManager.getXSTypeLabelFromNumber(6570) self.assertEqual(label, "AF") num = crossSectionGroupManager.getXSTypeNumberFromLabel("ZZ") self.assertEqual(num, 9090)
def test_conversion(self): label = crossSectionGroupManager.getXSTypeLabelFromNumber(65) self.assertEqual(label, "A") num = crossSectionGroupManager.getXSTypeNumberFromLabel("A") self.assertEqual(num, 65)