Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
    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
Esempio n. 4
0
    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
Esempio n. 5
0
 def test(self):
     'hsxml: parsing'
     from mccomponents.homogeneous_scatterer.hsxml import parse_file
     hs = parse_file('Ni-scatterer.xml')
     print hs
     return
Esempio n. 6
0
 def test(self):
     'hsxml: parsing'
     from mccomponents.homogeneous_scatterer.hsxml import parse_file
     hs = parse_file( 'Ni-scatterer.xml' )
     print hs
     return