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

Method test

test/IECore/FileSequence.py:530–546  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

528 self.assertRaises( RuntimeError, IECore.cp, s, s2 )
529
530 def test( self ) :
531
532 self.tearDown()
533 os.makedirs( os.path.join( "test", "sequences", "cpTest" ) )
534
535 s = IECore.FileSequence( os.path.join( "test", "sequences", "cpTest", "s.####.tif" ), IECore.FrameRange( 0, 100 ) )
536 for f in s.fileNames() :
537 self.touch( f )
538
539 s2 = IECore.FileSequence( os.path.join( "test", "sequences", "cpTest", "t.####.tif" ), IECore.FrameRange( 50, 150 ) )
540
541 IECore.cp( s, s2 )
542 IECore.rm( s )
543
544 l = IECore.ls( os.path.join( "test", "sequences", "cpTest" ) )
545 self.assertEqual( len( l ), 1 )
546 self.assertEqual( l[0], IECore.FileSequence( "t.####.tif", IECore.FrameRange( 50, 150 ) ) )
547
548 def tearDown( self ) :
549

Callers

nothing calls this directly

Calls 8

tearDownMethod · 0.95
fileNamesMethod · 0.95
touchMethod · 0.95
joinMethod · 0.80
FileSequenceMethod · 0.80
FrameRangeMethod · 0.80
lenFunction · 0.50
lsMethod · 0.45

Tested by

no test coverage detected