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

Method test_valid_presets

Test/astc_test_functional.py:657–673  ·  view source on GitHub ↗

Test all valid presets are accepted

(self)

Source from the content-addressed store, hash-verified

655 self.assertColorSame(color_in, color_out)
656
657 def test_valid_presets(self) -> None:
658 '''
659 Test all valid presets are accepted
660 '''
661 presets = ['-fastest', '-fast', '-medium',
662 '-thorough', '-verythorough', '-exhaustive']
663
664 image_in = self.get_ref_image_path('LDR', 'input', 'A')
665 image_out = self.get_tmp_image_path('LDR', 'decomp')
666
667 for preset in presets:
668 with self.subTest(preset=preset):
669 cmd = [self.binary, '-tl', image_in, image_out, '4x4', preset]
670 self.exec(cmd)
671 color_in = tli.Image(image_in).get_colors((0, 0))
672 color_out = tli.Image(image_out).get_colors((0, 0))
673 self.assertColorSame(color_in, color_out)
674
675 def test_valid_ldr_input_formats(self) -> None:
676 '''

Callers

nothing calls this directly

Calls 5

execMethod · 0.95
assertColorSameMethod · 0.95
get_ref_image_pathMethod · 0.80
get_tmp_image_pathMethod · 0.80
get_colorsMethod · 0.80

Tested by

no test coverage detected