コード例 #1
0
    def test_loop_by_name(self):

        e = get_object(self.root,"entry:NXentry")
        
        for (name,nref) in zip(e.names(),self.names):
            child = e[name]
            self.assertEqual(make_relative(e.path,child.path),nref)
コード例 #2
0
 def test_loop_by_index(self):
     e = get_object(self.root,"entry:NXentry")
 
     self.assertEqual(len(e),7)
     for index in range(len(e)):
         child = e[index]
         self.assertEqual(make_relative(e.path,child.path),
                          self.names[index])
コード例 #3
0
    def test_iteration(self):
        e = get_object(self.root,"entry:NXentry")

        for (c,p) in zip(e,self.names):
            self.assertEqual(make_relative(e.path,c.path),p)