MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / test_compress_esw_dsw

Method test_compress_esw_dsw

Test/astc_test_functional.py:911–930  ·  view source on GitHub ↗

Test compression and decompression swizzles

(self)

Source from the content-addressed store, hash-verified

909 self.assertColorSame(color_ref, color_test, swizzle=swizzle)
910
911 def test_compress_esw_dsw(self) -> None:
912 '''
913 Test compression and decompression swizzles
914 '''
915 # Compress a swizzled image, and swizzle back in decompression
916 image_dec = self.get_tmp_image_path('LDR', 'decomp')
917
918 cmd = [
919 self.binary, '-tl',
920 './Test/Data/Tiles/ldr.png',
921 image_dec, '4x4', '-exhaustive',
922 '-esw', 'gbar', '-dsw', 'argb']
923
924 self.exec(cmd)
925
926 # Fetch the three color
927 img = tli.Image(image_dec)
928 color_test = img.get_colors((7, 7))
929 color_ref = self.get_color_refs('LDR', 'BR')
930 self.assertColorSame(color_ref, color_test)
931
932 def test_compress_flip(self) -> None:
933 '''

Callers

nothing calls this directly

Calls 5

execMethod · 0.95
get_colorsMethod · 0.95
get_color_refsMethod · 0.95
assertColorSameMethod · 0.95
get_tmp_image_pathMethod · 0.80

Tested by

no test coverage detected