def setUp(self):
        unittest.TestCase.setUp(self)

        self.h = _AzimuthalAngularDetectorXMLHandler()

        self.obj = _AzimuthalAngularDetector(50)

        etree.register_namespace("mc", "http://pymontecarlo.sf.net")
        source = BytesIO(
            b'<mc:_azimuthalAngularDetector xmlns:mc="http://pymontecarlo.sf.net"><channels>50</channels><limits lower="0.0" upper="6.283185307179586" /></mc:_azimuthalAngularDetector>'
        )
        self.element = etree.parse(source).getroot()
Example #2
0
 def parse(self, element):
     det = _AngularDetectorXMLHandler.parse(self, element)
     return _AzimuthalAngularDetector(det.channels, det.limits_rad)
    def setUp(self):
        TestCase.setUp(self)

        self.d = _AzimuthalAngularDetector(50)