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

Method testRemoveEllipsis

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

Source from the content-addressed store, hash-verified

293 self.assertEqual( m.match( "/a/b/c" ), IECore.PathMatcher.Result.NoMatch )
294
295 def testRemoveEllipsis( self ) :
296
297 m = IECore.PathMatcher()
298 m.addPath( "/a/.../b" )
299
300 self.assertEqual( m.match( "/a" ), IECore.PathMatcher.Result.DescendantMatch )
301 self.assertEqual( m.match( "/a/c" ), IECore.PathMatcher.Result.DescendantMatch )
302 self.assertEqual( m.match( "/a/c/b" ), IECore.PathMatcher.Result.ExactMatch | IECore.PathMatcher.Result.DescendantMatch )
303
304 m.removePath( "/a/.../b" )
305
306 self.assertEqual( m.match( "/a" ), IECore.PathMatcher.Result.NoMatch )
307 self.assertEqual( m.match( "/a/c" ), IECore.PathMatcher.Result.NoMatch )
308 self.assertEqual( m.match( "/a/c/b" ), IECore.PathMatcher.Result.NoMatch )
309
310 def testAddPathReturnValue( self ) :
311

Callers

nothing calls this directly

Calls 4

addPathMethod · 0.95
matchMethod · 0.95
removePathMethod · 0.95
PathMatcherMethod · 0.80

Tested by

no test coverage detected