MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testMatch

Method testMatch

test/IECore/PathMatcherTest.py:76–91  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

74 return paths
75
76 def testMatch( self ) :
77
78 m = IECore.PathMatcher( [ "/a", "/red", "/b/c/d" ] )
79
80 for path, result in [
81 ( "/a", IECore.PathMatcher.Result.ExactMatch ),
82 ( "/red", IECore.PathMatcher.Result.ExactMatch ),
83 ( "/re", IECore.PathMatcher.Result.NoMatch ),
84 ( "/redThing", IECore.PathMatcher.Result.NoMatch ),
85 ( "/b/c/d", IECore.PathMatcher.Result.ExactMatch ),
86 ( "/c", IECore.PathMatcher.Result.NoMatch ),
87 ( "/a/b", IECore.PathMatcher.Result.AncestorMatch ),
88 ( "/blue", IECore.PathMatcher.Result.NoMatch ),
89 ( "/b/c", IECore.PathMatcher.Result.DescendantMatch ),
90 ] :
91 self.assertEqual( m.match( path ), result )
92
93 def testLookupScaling( self ) :
94

Callers

nothing calls this directly

Calls 2

matchMethod · 0.95
PathMatcherMethod · 0.80

Tested by

no test coverage detected