Beispiel #1
0
 def test_var_vs_grp(self):
     g = og('root', vv=[ov('tst1')], gg=[og('tst1')])
     with self.assertRaises(NameConflictError) as err_context:
         check_names(g)
     msg = err_context.exception.message
     self.check_all_in_str(msg, ['group "root"', 'both',
                                 'variable', 'group', 'tst1'])
Beispiel #2
0
 def test_subgroup_okay(self):
     g = og('root', vv=[ov('test_var')],
            gg=[og('tst1', vv=[ov('test_var')])])
     subgroup = g.groups['tst1']
     self.assertFalse(group_is_tagged(g))
     self.assertFalse(group_is_tagged(subgroup))
     check_names(g)
     self.assertFalse(group_is_tagged(g))
     self.assertFalse(group_is_tagged(subgroup))
Beispiel #3
0
 def test_okay(self):
     g = og('root', vv=[ov('test_v')], dd=[od('test_d')],
            gg=[og('test_g')])
     self.assertFalse(group_is_tagged(g))
     check_names(g)
     self.assertFalse(group_is_tagged(g))
Beispiel #4
0
 def test_empty(self):
     g = og('root')
     self.assertFalse(group_is_tagged(g))
     check_names(g)
     self.assertFalse(group_is_tagged(g))