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

Method test_compress_dsw

Test/astc_test_functional.py:885–909  ·  view source on GitHub ↗

Test decompression swizzles.

(self)

Source from the content-addressed store, hash-verified

883 self.assertColorSame(color_ref, color_test, swizzle=swizzle)
884
885 def test_compress_dsw(self) -> None:
886 '''
887 Test decompression swizzles.
888 '''
889 # The swizzles to test
890 swizzles = ['rgba', 'g0r1', 'rrrg']
891
892 # Decompress a swizzled image
893 for swizzle in swizzles:
894 with self.subTest(swizzle=swizzle):
895 image_dec = self.get_tmp_image_path('LDR', 'decomp')
896
897 cmd = [
898 self.binary, '-tl',
899 './Test/Data/Tiles/ldr.png',
900 image_dec, '4x4', '-exhaustive',
901 '-dsw', swizzle]
902
903 self.exec(cmd)
904
905 # Fetch the three color
906 img = tli.Image(image_dec)
907 color_test = img.get_colors((7, 7))
908 color_ref = self.get_color_refs('LDR', 'BR')
909 self.assertColorSame(color_ref, color_test, swizzle=swizzle)
910
911 def test_compress_esw_dsw(self) -> None:
912 '''

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