def test__getDoubleAttr(self): """check Attributes._getDoubleAttr() """ pdfc = PDFCalculator() pdfc.foo = 11 self.assertRaises(AttributeError, pdfc._getDoubleAttr, 'foo') pdfc._registerDoubleAttribute('foo') self.assertEqual(11, pdfc._getDoubleAttr('foo')) pdfc.rmax = 22 self.assertEqual(22, pdfc._getDoubleAttr('rmax')) setattr(pdfc, 'rmax', 23) self.assertEqual(23, pdfc._getDoubleAttr('rmax')) self.assertRaises(Exception, setattr, pdfc, 'rmax', 'xxx') return