( self )
| 651 | IECore.CompoundData( { "compressor" : "lz4", "compressionLevel" : 9, 'version': IECore.IntData( 7 ), "compressionThreadCount" : 32, "decompressionThreadCount" : 1 } ) ) |
| 652 | |
| 653 | def testDefaultCompressionIsOff( self ): |
| 654 | |
| 655 | filePath = os.path.join( ".", "test", "FileIndexedIO.fio" ) |
| 656 | |
| 657 | f = IECore.IndexedIO.create( filePath, [], IECore.IndexedIO.OpenMode.Write ) |
| 658 | g = f.subdirectory("sub1", IECore.IndexedIO.MissingBehaviour.CreateIfMissing ) |
| 659 | g.write( "foo", IECore.IntVectorData( range( 1024 ) ) ) |
| 660 | |
| 661 | del g, f |
| 662 | |
| 663 | size = os.path.getsize( filePath ) |
| 664 | |
| 665 | self.assertTrue( ( size > (1024 * 4 ) ) ) |
| 666 | self.assertTrue( ( size < (1024 * 4 + 512 ) ) ) |
| 667 | |
| 668 | f = IECore.IndexedIO.create( filePath, [], IECore.IndexedIO.OpenMode.Read ) |
| 669 | |
| 670 | self.assertEqual( f.metadata(), |
| 671 | IECore.CompoundData( { "compressor" : "lz4", "compressionLevel" : 0, 'version': IECore.IntData( 7 ), "compressionThreadCount" : 1, "decompressionThreadCount" : 1 } ) ) |
| 672 | |
| 673 | def setUp( self ): |
| 674 |
nothing calls this directly
no test coverage detected