def test2(self): 'parsing, rendering and parsing again' filename = 'Ni1-scatterer.xml' from mccomponents.homogeneous_scatterer.hsxml import parse_file, weave hs = parse_file(filename) weaved = '%s.weaved' % filename weave(hs, open(weaved, 'w')) hs1 = parse_file(weaved) shape = hs1.shape() self.assertEqual(shape.__class__.__name__, 'Sphere') from mccomponents.homogeneous_scatterer.Kernel import Kernel self.assert_(isinstance(hs1.kernel(), Kernel)) return
def test2(self): 'parsing, rendering and parsing again' filename = 'Ni1-scatterer.xml' from mccomponents.homogeneous_scatterer.hsxml import parse_file, weave hs = parse_file( filename ) weaved = '%s.weaved' % filename weave( hs, open( weaved, 'w' ) ) hs1 = parse_file( weaved ) shape = hs1.shape() self.assertEqual( shape.__class__.__name__, 'Sphere' ) from mccomponents.homogeneous_scatterer.Kernel import Kernel self.assert_( isinstance( hs1.kernel(), Kernel) ) return
def test1(self): 'hsxml: another parsing' from mccomponents.homogeneous_scatterer.hsxml import parse_file hs = parse_file('Ni1-scatterer.xml') shape = hs.shape() self.assertEqual(shape.__class__.__name__, 'Sphere') from mccomponents.homogeneous_scatterer.Kernel import Kernel self.assert_(isinstance(hs.kernel(), Kernel)) return
def test1(self): 'hsxml: another parsing' from mccomponents.homogeneous_scatterer.hsxml import parse_file hs = parse_file( 'Ni1-scatterer.xml' ) shape = hs.shape() self.assertEqual( shape.__class__.__name__, 'Sphere' ) from mccomponents.homogeneous_scatterer.Kernel import Kernel self.assert_( isinstance( hs.kernel(), Kernel) ) return
def test(self): 'hsxml: parsing' from mccomponents.homogeneous_scatterer.hsxml import parse_file hs = parse_file('Ni-scatterer.xml') print hs return
def test(self): 'hsxml: parsing' from mccomponents.homogeneous_scatterer.hsxml import parse_file hs = parse_file( 'Ni-scatterer.xml' ) print hs return