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

Method testEllipsisAsTerminator

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

Source from the content-addressed store, hash-verified

232 self.assertEqual( f.match( path ), int( result ) )
233
234 def testEllipsisAsTerminator( self ) :
235
236 f = IECore.PathMatcher( [
237 "/a/...",
238 ] )
239
240 for path, result in [
241 ( "/a", f.Result.ExactMatch | f.Result.DescendantMatch ),
242 ( "/a/ball", f.Result.ExactMatch | f.Result.DescendantMatch | f.Result.AncestorMatch ),
243 ( "/a/red/car", f.Result.ExactMatch | f.Result.DescendantMatch | f.Result.AncestorMatch ),
244 ( "/a/red/car/rolls", f.Result.ExactMatch | f.Result.DescendantMatch | f.Result.AncestorMatch ),
245 ( "/a/terminating/ellipsis/matches/everything/below/it", f.Result.ExactMatch | f.Result.DescendantMatch | f.Result.AncestorMatch ),
246 ] :
247
248 self.assertEqual( f.match( path ), int( result ) )
249
250 def testCopyConstructorAppearsDeep( self ) :
251

Callers

nothing calls this directly

Calls 2

matchMethod · 0.95
PathMatcherMethod · 0.80

Tested by

no test coverage detected