

def testExactPreferredToWildcards(self):

    class MetadataTestNodeD(Gaffer.Node):

        def __init__(self, name='MetadataTestNodeD'):
            Gaffer.Node.__init__(self, name)
            self['a'] = Gaffer.IntPlug()
            self['b'] = Gaffer.IntPlug()
    IECore.registerRunTimeTyped(MetadataTestNodeD)
    Gaffer.Metadata.registerNode(MetadataTestNodeD, plugs={
        '*': ['test', 'wildcard'],
        'a': ['test', 'exact'],
    })
    n = MetadataTestNodeD()
    self.assertEqual(Gaffer.Metadata.plugValue(n['a'], 'test'), 'exact')
    self.assertEqual(Gaffer.Metadata.plugValue(n['b'], 'test'), 'wildcard')

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/MetadataTest.py MetadataTest.testExactPreferredToWildcards/original