def testNotFilters(self):
        groupRecipe = """
class GroupConflict(GroupRecipe):
    name = 'group-conflict'
    version = '1.0.0'

    clearBuildReqs()

    def setup(r):
        r.add('foo', '2')
        r.createGroup('group-2')
        r.addNewGroup('group-2', groupName = 'group-conflict')
        r.setDefaultGroup('group-2')
        r.add('bar', '1')
        r.createGroup('group-1')
        r.addNewGroup('group-1', groupName = 'group-conflict')
        r.setDefaultGroup('group-1')
        r.add('foo', '1')
        r.add('bar', '2')
        r.add('foo', '2')

        group1 = r.troveFilter("group-1")

        r.VersionConflicts(exceptions = ~group1)
"""
        self.addComponent('foo:doc', '1', filePrimer = 1)
        self.addComponent('foo:runtime', '1', filePrimer = 2)
        self.addCollection('foo', '1', [':doc', ':runtime'])
        self.addComponent('foo:doc', '2', filePrimer = 3)
        self.addComponent('foo:runtime', '2', filePrimer = 4)
        self.addCollection('foo', '2', [':doc', ':runtime'])
        self.addComponent('bar:doc', '1', filePrimer = 5)
        self.addComponent('bar:runtime', '1', filePrimer = 6)
        self.addCollection('bar', '1', [':doc', ':runtime'])
        self.addComponent('bar:doc', '2', filePrimer = 7)
        self.addComponent('bar:runtime', '2', filePrimer = 8)
        self.addCollection('bar', '2', [':doc', ':runtime'])

        try:
            self.build(groupRecipe, 'GroupConflict')
        except policy.PolicyError, e:
            self.assertFalse("foo" not in str(e))
            self.assertFalse("foo:runtime" not in str(e))
            self.assertFalse("foo:doc" not in str(e))
            self.assertFalse("bar" in str(e))
            self.assertFalse("group-1" not in str(e))
            self.assertFalse("group-2" in str(e))
        else:
            self.fail("expected policy error")
        self.assertRaises(policy.PolicyError, self.build,
                groupRecipe, 'GroupConflict')
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/buildtest/grouppolicytest.py/GroupPolicyTest.testNotFilters/original