Example #1
0
    def _check_name_type(self,g,n,t):
        """check name and class of a group

        Checks the name and the class a group belongs to and returns true if it
        satisfies the user provided values.

        Arg:
            g (nxgroup) ..... nexus group
            n (string) ...... expected name of the group
            t (string) ...... expected class of the group

        Return:
            true if g has name n and class t

        """

        return g.name == n and get_class(g)==t
    def test_with_group(self):
        root = self._file.root()
        g = root.create_group("entry","NXentry")

        self.assertEqual(get_class(g),"NXentry")