Lines Matching refs:self
122 def __init__(self, *args, **kwargs):
126 self.binary = encoder.binary
128 def setUp(self):
134 self.tempDir = tempfile.TemporaryDirectory()
136 def tearDown(self):
142 self.tempDir.cleanup()
143 self.tempDir = None
180 def get_tmp_image_path(self, profile, mode):
198 tmpFile, tmpPath = tempfile.mkstemp(mode, dir=self.tempDir.name)
226 tmpFile, tmpPath = tempfile.mkstemp(suffix, dir=self.tempDir.name)
241 def compare(self, image1, image2):
266 self.assertEqual(img1.getbands(), ("R", "G", "B"))
267 self.assertEqual(img2.getbands(), ("R", "G", "B", "A"))
272 self.assertEqual(sum(alphaHist[:-1]), 0)
288 def get_channel_rmse(self, image1, image2):
310 self.assertEqual(img1.getbands(), ("R", "G", "B"))
311 self.assertEqual(img2.getbands(), ("R", "G", "B", "A"))
316 self.assertEqual(sum(alphaHist[:-1]), 0)
363 def assertColorSame(self, colorRef, colorNew, threshold=0.02, swiz=None):
376 self.assertEqual(len(colorRef), len(colorNew))
380 self.assertEqual(len(swiz), len(colorRef))
401 self.assertAlmostEqual(chRef, chNew, delta=deltaMax)
403 def exec(self, command, pattern=None):
442 self.assertGreaterEqual(rcode, 0, msg)
446 self.assertEqual(rcode, 0, msg)
451 self.assertIsNotNone(match)
456 def test_ldr_compress(self):
460 imIn = self.get_ref_image_path("LDR", "input", "A")
461 imOut = self.get_tmp_image_path("LDR", "comp")
462 imRef = self.get_ref_image_path("LDR", "comp", "A")
464 command = [self.binary, "-cl", imIn, imOut, "6x6", "-exhaustive"]
465 self.exec(command)
466 self.assertTrue(filecmp.cmp(imRef, imOut, False))
468 def test_srgb_compress(self):
472 imIn = self.get_ref_image_path("LDRS", "input", "A")
473 imOut = self.get_tmp_image_path("LDRS", "comp")
474 imRef = self.get_ref_image_path("LDRS", "comp", "A")
476 command = [self.binary, "-cs", imIn, imOut, "6x6", "-exhaustive"]
477 self.exec(command)
478 self.assertTrue(filecmp.cmp(imRef, imOut, False))
480 def test_hdr_compress1(self):
484 imIn = self.get_ref_image_path("HDR", "input", "A")
485 imOut = self.get_tmp_image_path("HDR", "comp")
486 imRef = self.get_ref_image_path("HDR", "comp", "A")
488 command = [self.binary, "-ch", imIn, imOut, "6x6", "-exhaustive"]
489 self.exec(command)
490 self.assertTrue(filecmp.cmp(imRef, imOut, False))
492 def test_hdr_compress2(self):
496 imIn = self.get_ref_image_path("HDR", "input", "A")
497 imOut = self.get_tmp_image_path("HDR", "comp")
498 imRef = self.get_ref_image_path("HDR", "comp", "A")
500 command = [self.binary, "-cH", imIn, imOut, "6x6", "-exhaustive"]
501 self.exec(command)
502 self.assertTrue(filecmp.cmp(imRef, imOut, False))
504 def test_ldr_decompress(self):
508 imIn = self.get_ref_image_path("LDR", "comp", "A")
509 imOut = self.get_tmp_image_path("LDR", "decomp")
510 imRef = self.get_ref_image_path("LDR", "input", "A")
512 command = [self.binary, "-dl", imIn, imOut]
513 self.exec(command)
514 self.assertTrue(self.compare(imRef, imOut))
516 def test_srgb_decompress(self):
520 imIn = self.get_ref_image_path("LDRS", "comp", "A")
521 imOut = self.get_tmp_image_path("LDRS", "decomp")
522 imRef = self.get_ref_image_path("LDRS", "input", "A")
524 command = [self.binary, "-ds", imIn, imOut]
525 self.exec(command)
526 self.assertTrue(self.compare(imRef, imOut))
528 def test_hdr_decompress1(self):
532 imIn = self.get_ref_image_path("HDR", "comp", "A")
533 imOut = self.get_tmp_image_path("HDR", "decomp")
534 imRef = self.get_ref_image_path("HDR", "input", "A")
536 command = [self.binary, "-dh", imIn, imOut]
537 self.exec(command)
541 self.assertColorSame(colRef, colOut)
543 def test_hdr_decompress2(self):
547 imIn = self.get_ref_image_path("HDR", "comp", "A")
548 imOut = self.get_tmp_image_path("HDR", "decomp")
549 imRef = self.get_ref_image_path("HDR", "input", "A")
551 command = [self.binary, "-dH", imIn, imOut]
552 self.exec(command)
556 self.assertColorSame(colRef, colOut)
558 def test_ldr_roundtrip(self):
562 imIn = self.get_ref_image_path("LDR", "input", "A")
563 imOut = self.get_tmp_image_path("LDR", "decomp")
565 command = [self.binary, "-tl", imIn, imOut, "6x6", "-exhaustive"]
566 self.exec(command)
567 self.assertTrue(self.compare(imIn, imOut))
569 def test_srgb_roundtrip(self):
573 imIn = self.get_ref_image_path("LDRS", "input", "A")
574 imOut = self.get_tmp_image_path("LDRS", "decomp")
576 command = [self.binary, "-ts", imIn, imOut, "6x6", "-exhaustive"]
577 self.exec(command)
578 self.assertTrue(self.compare(imIn, imOut))
580 def test_hdr_roundtrip1(self):
584 imIn = self.get_ref_image_path("HDR", "input", "A")
585 imOut = self.get_tmp_image_path("HDR", "decomp")
587 command = [self.binary, "-th", imIn, imOut, "6x6", "-exhaustive"]
588 self.exec(command)
591 self.assertColorSame(colIn, colOut)
593 def test_hdr_roundtrip2(self):
597 imIn = self.get_ref_image_path("HDR", "input", "A")
598 imOut = self.get_tmp_image_path("HDR", "decomp")
600 command = [self.binary, "-tH", imIn, imOut, "6x6", "-exhaustive"]
601 self.exec(command)
604 self.assertColorSame(colIn, colOut)
606 def test_valid_2d_block_sizes(self):
615 imIn = self.get_ref_image_path("LDR", "input", "A")
616 imOut = self.get_tmp_image_path("LDR", "decomp")
619 with self.subTest(blockSize=blk):
620 command = [self.binary, "-tl", imIn, imOut, blk, "-exhaustive"]
621 self.exec(command)
624 self.assertColorSame(colIn, colOut)
626 def test_valid_3d_block_sizes(self):
637 imIn = self.get_ref_image_path("LDR", "input", "A")
638 imOut = self.get_tmp_image_path("LDR", "decomp")
641 with self.subTest(blockSize=blk):
642 command = [self.binary, "-tl", imIn, imOut, blk, "-exhaustive"]
643 self.exec(command)
646 self.assertColorSame(colIn, colOut)
648 def test_valid_presets(self):
655 imIn = self.get_ref_image_path("LDR", "input", "A")
656 imOut = self.get_tmp_image_path("LDR", "decomp")
659 with self.subTest(preset=preset):
660 command = [self.binary, "-tl", imIn, imOut, "4x4", preset]
661 self.exec(command)
664 self.assertColorSame(colIn, colOut)
666 def test_valid_ldr_input_formats(self):
673 with self.subTest(imgFormat=imgFormat):
675 imOut = self.get_tmp_image_path("LDR", "decomp")
677 command = [self.binary, "-tl", imIn, imOut, "4x4", "-fast"]
678 self.exec(command)
688 self.assertColorSame(colIn, colOut)
697 self.assertColorSame(colIn, colOut)
699 def test_valid_uncomp_ldr_output_formats(self):
706 with self.subTest(imgFormat=imgFormat):
707 imIn = self.get_ref_image_path("LDR", "input", "A")
708 imOut = self.get_tmp_image_path("EXP", ".%s" % imgFormat)
710 command = [self.binary, "-tl", imIn, imOut, "4x4", "-fast"]
711 self.exec(command)
717 self.assertColorSame(colIn, colOut)
719 def test_valid_comp_ldr_output_formats(self):
726 with self.subTest(imgFormat=imgFormat):
727 imIn = self.get_ref_image_path("LDR", "input", "A")
728 imOut = self.get_tmp_image_path("EXP", ".%s" % imgFormat)
729 imOut2 = self.get_tmp_image_path("LDR", "decomp")
731 command = [self.binary, "-cl", imIn, imOut, "4x4", "-fast"]
732 self.exec(command)
734 command = [self.binary, "-dl", imOut, imOut2]
735 self.exec(command)
741 self.assertColorSame(colIn, colOut2)
743 def test_valid_hdr_input_formats(self):
750 with self.subTest(imgFormat=imgFormat):
752 imOut = self.get_tmp_image_path("HDR", "decomp")
754 command = [self.binary, "-th", imIn, imOut, "4x4", "-fast"]
755 self.exec(command)
761 self.assertColorSame(colIn, colOut)
763 def test_valid_uncomp_hdr_output_formats(self):
770 with self.subTest(imgFormat=imgFormat):
771 imIn = self.get_ref_image_path("HDR", "input", "A")
772 imOut = self.get_tmp_image_path("EXP", ".%s" % imgFormat)
774 command = [self.binary, "-th", imIn, imOut, "4x4", "-fast"]
775 self.exec(command)
781 self.assertColorSame(colIn, colOut)
783 def test_valid_comp_hdr_output_formats(self):
790 with self.subTest(imgFormat=imgFormat):
791 imIn = self.get_ref_image_path("HDR", "input", "A")
792 imOut = self.get_tmp_image_path("EXP", ".%s" % imgFormat)
793 imOut2 = self.get_tmp_image_path("HDR", "decomp")
795 command = [self.binary, "-ch", imIn, imOut, "4x4", "-fast"]
796 self.exec(command)
798 command = [self.binary, "-dh", imOut, imOut2]
799 self.exec(command)
805 self.assertColorSame(colIn, colOut2)
807 def test_compress_normal_psnr(self):
811 decompFile = self.get_tmp_image_path("LDR", "decomp")
814 self.binary, "-tl",
818 refdB = float(self.exec(command, LDR_RGB_PSNR_PATTERN))
821 testdB = float(self.exec(command, LDR_RGB_PSNR_PATTERN))
826 self.assertNotEqual(refdB, testdB)
828 def test_compress_normal_percep(self):
832 decompFile = self.get_tmp_image_path("LDR", "decomp")
835 self.binary, "-tl",
839 refdB = float(self.exec(command, LDR_RGB_PSNR_PATTERN))
843 testdB = float(self.exec(command, LDR_RGB_PSNR_PATTERN))
848 self.assertNotEqual(refdB, testdB)
850 def test_compress_esw(self):
859 with self.subTest(swizzle=swizzle):
860 decompFile = self.get_tmp_image_path("LDR", "decomp")
863 self.binary, "-tl",
868 self.exec(command)
873 colorRef = self.get_color_refs("LDR", "BR")
874 self.assertColorSame(colorRef[0], colorVal[0], swiz=swizzle)
876 def test_compress_dsw(self):
885 with self.subTest(swizzle=swizzle):
886 decompFile = self.get_tmp_image_path("LDR", "decomp")
889 self.binary, "-tl",
894 self.exec(command)
899 colorRef = self.get_color_refs("LDR", "BR")
900 self.assertColorSame(colorRef[0], colorVal[0], swiz=swizzle)
902 def test_compress_esw_dsw(self):
907 decompFile = self.get_tmp_image_path("LDR", "decomp")
910 self.binary, "-tl",
915 self.exec(command)
920 colorRef = self.get_color_refs("LDR", "BR")
921 self.assertColorSame(colorRef[0], colorVal[0])
923 def test_compress_flip(self):
928 compFile = self.get_tmp_image_path("LDR", "comp")
931 self.binary, "-cl",
935 self.exec(command)
938 decompFile = self.get_tmp_image_path("LDR", "decomp")
941 self.binary, "-dl",
945 self.exec(command)
948 colorRef = self.get_color_refs("LDR", "BL")
952 self.assertColorSame(colorRef[0], colorVal[0])
954 def test_decompress_flip(self):
959 compFile = self.get_tmp_image_path("LDR", "comp")
962 self.binary, "-cl",
966 self.exec(command)
969 decompFile = self.get_tmp_image_path("LDR", "decomp")
972 self.binary, "-dl",
976 self.exec(command)
979 colorRef = self.get_color_refs("LDR", "BL")
983 self.assertColorSame(colorRef[0], colorVal[0])
985 def test_roundtrip_flip(self):
990 decompFile = self.get_tmp_image_path("LDR", "decomp")
993 self.binary, "-tl",
997 self.exec(command)
1000 colorRef = self.get_color_refs("LDR", "TL")
1005 self.assertColorSame(colorRef[0], colorVal[0])
1007 def test_channel_weighting(self):
1012 decompFile = self.get_tmp_image_path("LDR", "decomp")
1016 self.binary, "-tl",
1019 self.exec(command)
1020 baseRMSE = self.get_channel_rmse(inputFile, decompFile)
1031 with self.subTest(channel=chName):
1034 self.exec(command2)
1035 chRMSE = self.get_channel_rmse(inputFile, decompFile)
1036 self.assertLess(chRMSE[chIdx], baseRMSE[chIdx])
1038 def test_partition_count_limit(self):
1043 decompFile = self.get_tmp_image_path("LDR", "decomp")
1047 self.binary, "-tl",
1050 self.exec(command)
1051 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1054 self.exec(command)
1055 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1058 self.assertGreater(testRMSE, refRMSE)
1060 def test_2partition_index_limit(self):
1065 decompFile = self.get_tmp_image_path("LDR", "decomp")
1069 self.binary, "-tl",
1072 self.exec(command)
1073 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1076 self.exec(command)
1077 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1080 self.assertGreater(testRMSE, refRMSE)
1082 def test_3partition_index_limit(self):
1087 decompFile = self.get_tmp_image_path("LDR", "decomp")
1091 self.binary, "-tl",
1094 self.exec(command)
1095 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1098 self.exec(command)
1099 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1102 self.assertGreater(testRMSE, refRMSE)
1104 def test_4partition_index_limit(self):
1109 decompFile = self.get_tmp_image_path("LDR", "decomp")
1113 self.binary, "-tl",
1116 self.exec(command)
1117 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1120 self.exec(command)
1121 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1124 self.assertGreater(testRMSE, refRMSE)
1126 def test_blockmode_limit(self):
1131 decompFile = self.get_tmp_image_path("LDR", "decomp")
1135 self.binary, "-tl",
1138 self.exec(command)
1139 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1142 self.exec(command)
1143 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1146 self.assertGreater(testRMSE, refRMSE)
1148 def test_refinement_limit(self):
1153 decompFile = self.get_tmp_image_path("LDR", "decomp")
1156 self.binary, "-tl",
1159 self.exec(command)
1160 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1163 self.exec(command)
1164 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1167 self.assertGreater(testRMSE, refRMSE)
1169 def test_candidate_limit(self):
1174 decompFile = self.get_tmp_image_path("LDR", "decomp")
1177 self.binary, "-tl",
1180 self.exec(command)
1181 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1184 self.exec(command)
1185 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1188 self.assertGreater(testRMSE, refRMSE)
1190 def test_db_cutoff_limit(self):
1195 decompFile = self.get_tmp_image_path("LDR", "decomp")
1199 self.binary, "-tl",
1202 self.exec(command)
1203 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1206 self.exec(command)
1207 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1210 self.assertGreater(testRMSE, refRMSE)
1212 def test_2partition_early_limit(self):
1217 decompFile = self.get_tmp_image_path("LDR", "decomp")
1221 self.binary, "-tl",
1224 self.exec(command)
1225 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1228 self.exec(command)
1229 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1232 self.assertGreater(testRMSE, refRMSE)
1234 def test_3partition_early_limit(self):
1239 decompFile = self.get_tmp_image_path("LDR", "decomp")
1243 self.binary, "-tl",
1246 self.exec(command)
1247 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1250 self.exec(command)
1251 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1254 self.assertNotEqual(testRMSE, refRMSE)
1256 def test_2plane_correlation_limit(self):
1261 decompFile = self.get_tmp_image_path("LDR", "decomp")
1265 self.binary, "-tl",
1268 self.exec(command)
1269 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1272 self.exec(command)
1273 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1276 self.assertGreater(testRMSE, refRMSE)
1278 def test_2partition_candidate_limit(self):
1283 decompFile = self.get_tmp_image_path("LDR", "decomp")
1287 self.binary, "-tl",
1290 self.exec(command)
1291 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1294 self.exec(command)
1295 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1298 self.assertGreater(testRMSE, refRMSE)
1300 def test_3partition_candidate_limit(self):
1305 decompFile = self.get_tmp_image_path("LDR", "decomp")
1309 self.binary, "-tl",
1312 self.exec(command)
1313 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1316 self.exec(command)
1317 testRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1320 self.assertGreater(testRMSE, refRMSE)
1322 def test_4partition_candidate_limit(self):
1327 decompFile = self.get_tmp_image_path("LDR", "decomp")
1331 self.binary, "-tl",
1334 self.exec(command)
1335 refRMSE = sum(self.get_channel_rmse(inputFile, decompFile))
1338 self.exec(command)
1344 # self.assertGreater(testRMSE, refRMSE)
1347 def test_thread_count(self):
1352 decompFile = self.get_tmp_image_path("LDR", "decomp")
1356 self.binary, "-tl",
1360 self.exec(command)
1365 self.exec(command)
1369 self.assertGreater(testTime, refTime)
1371 def test_silent(self):
1376 decompFile = self.get_tmp_image_path("LDR", "decomp")
1380 self.binary, "-tl",
1382 stdout = self.exec(command)
1385 stdoutSilent = self.exec(command)
1390 self.assertLess(len(stdoutSilent), len(stdout))
1392 def test_image_quality_stability(self):
1397 p1DecFile = self.get_tmp_image_path("LDR", "decomp")
1398 p2CompFile = self.get_tmp_image_path("LDR", "comp")
1399 p2DecFile = self.get_tmp_image_path("LDR", "decomp")
1402 command = [self.binary, "-tl", inputFile, p1DecFile, "4x4", "-medium"]
1403 self.exec(command)
1406 command = [self.binary, "-cl", inputFile, p2CompFile, "4x4", "-medium",
1408 self.exec(command)
1409 command = [self.binary, "-dl", p2CompFile, p2DecFile]
1410 self.exec(command)
1413 p1RMSE = sum(self.get_channel_rmse(inputFile, p1DecFile))
1414 p2RMSE = sum(self.get_channel_rmse(inputFile, p2DecFile))
1415 self.assertEqual(p1RMSE, p2RMSE)
1432 def exec(self, command, expectPass=False):
1474 self.assertEqual(rcode, 0, "Exec did not pass as expected")
1475 self.assertNotIn("ERROR", result.stderr)
1481 self.assertGreaterEqual(rcode, 0, msg)
1485 self.assertIn("ERROR", result.stderr)
1486 self.assertGreater(rcode, 0, "Exec did not fail as expected")
1488 def exec_with_omit(self, command, startOmit):
1506 with self.subTest(omit=omit):
1509 self.exec(testCommand, expectPass)
1511 def test_cl_missing_args(self):
1517 self.binary, "-cl",
1518 self.get_ref_image_path("LDR", "input", "A"),
1519 self.get_tmp_image_path("LDR", "comp"),
1522 self.exec_with_omit(command, 2)
1524 def test_cl_missing_input(self):
1530 self.binary, "-cl",
1532 self.get_tmp_image_path("LDR", "comp"),
1535 self.exec(command)
1537 def test_cl_missing_input_array_slice(self):
1543 self.binary, "-cl",
1545 self.get_tmp_image_path("LDR", "comp"),
1548 self.exec(command)
1550 def test_cl_unknown_input(self):
1556 self.binary, "-cl",
1558 self.get_tmp_image_path("LDR", "comp"),
1561 self.exec(command)
1563 def test_cl_missing_output(self):
1569 self.binary, "-cl",
1570 self.get_ref_image_path("LDR", "input", "A"),
1574 self.exec(command)
1576 def test_cl_unknown_output(self):
1582 self.binary, "-cl",
1583 self.get_ref_image_path("LDR", "input", "A"),
1587 self.exec(command)
1589 def test_cl_bad_block_size(self):
1606 self.binary, "-cl",
1607 self.get_ref_image_path("LDR", "input", "A"),
1608 self.get_tmp_image_path("LDR", "comp"),
1612 self.exec(command, True)
1616 with self.subTest(blockSize=badSize):
1618 self.exec(command)
1620 def test_cl_bad_preset(self):
1626 self.binary, "-cl",
1627 self.get_ref_image_path("LDR", "input", "A"),
1628 self.get_tmp_image_path("LDR", "comp"),
1631 self.exec(command)
1633 def test_cl_bad_argument(self):
1639 self.binary, "-cl",
1640 self.get_ref_image_path("LDR", "input", "A"),
1641 self.get_tmp_image_path("LDR", "comp"),
1644 self.exec(command)
1646 def test_cl_2d_block_with_array(self):
1656 self.binary, "-cl",
1658 self.get_tmp_image_path("LDR", "comp"),
1661 self.exec(command)
1663 def test_cl_array_missing_args(self):
1669 self.binary, "-cl",
1671 self.get_tmp_image_path("LDR", "comp"),
1675 self.exec_with_omit(command, 7)
1677 def test_tl_missing_args(self):
1683 self.binary, "-tl",
1684 self.get_ref_image_path("LDR", "input", "A"),
1685 self.get_tmp_image_path("LDR", "decomp"),
1689 self.exec_with_omit(command, 2)
1691 def test_tl_missing_input(self):
1697 self.binary, "-tl",
1699 self.get_tmp_image_path("LDR", "decomp"),
1702 self.exec(command)
1704 def test_tl_unknown_input(self):
1710 self.binary, "-tl",
1712 self.get_tmp_image_path("LDR", "decomp"),
1715 self.exec(command)
1717 def test_tl_missing_output(self):
1723 self.binary, "-tl",
1724 self.get_ref_image_path("LDR", "input", "A"),
1728 self.exec(command)
1730 def test_tl_bad_block_size(self):
1747 self.binary, "-tl",
1748 self.get_ref_image_path("LDR", "input", "A"),
1749 self.get_tmp_image_path("LDR", "decomp"),
1753 self.exec(command, True)
1757 with self.subTest(blockSize=badSize):
1759 self.exec(command)
1761 def test_tl_bad_preset(self):
1767 self.binary, "-tl",
1768 self.get_ref_image_path("LDR", "input", "A"),
1769 self.get_tmp_image_path("LDR", "decomp"),
1772 self.exec(command)
1774 def test_tl_bad_argument(self):
1780 self.binary, "-tl",
1781 self.get_ref_image_path("LDR", "input", "A"),
1782 self.get_tmp_image_path("LDR", "decomp"),
1785 self.exec(command)
1787 def test_dl_missing_args(self):
1793 self.binary, "-dl",
1794 self.get_ref_image_path("LDR", "comp", "A"),
1795 self.get_tmp_image_path("LDR", "decomp")]
1798 self.exec_with_omit(command, 2)
1800 def test_dl_missing_output(self):
1806 self.binary, "-dl",
1807 self.get_ref_image_path("LDR", "comp", "A"),
1810 self.exec(command)
1812 def test_cl_a_missing_args(self):
1818 self.binary, "-cl",
1819 self.get_ref_image_path("LDR", "input", "A"),
1820 self.get_tmp_image_path("LDR", "comp"),
1825 self.exec_with_omit(command, 7)
1827 def test_cl_cw_missing_args(self):
1833 self.binary, "-cl",
1834 self.get_ref_image_path("LDR", "input", "A"),
1835 self.get_tmp_image_path("LDR", "comp"),
1840 self.exec_with_omit(command, 7)
1842 def test_cl_2partitionindexlimit_missing_args(self):
1848 self.binary, "-cl",
1849 self.get_ref_image_path("LDR", "input", "A"),
1850 self.get_tmp_image_path("LDR", "comp"),
1855 self.exec_with_omit(command, 7)
1857 def test_cl_3partitionindexlimit_missing_args(self):
1863 self.binary, "-cl",
1864 self.get_ref_image_path("LDR", "input", "A"),
1865 self.get_tmp_image_path("LDR", "comp"),
1870 self.exec_with_omit(command, 7)
1872 def test_cl_4partitionindexlimit_missing_args(self):
1878 self.binary, "-cl",
1879 self.get_ref_image_path("LDR", "input", "A"),
1880 self.get_tmp_image_path("LDR", "comp"),
1885 self.exec_with_omit(command, 7)
1887 def test_cl_2partitioncandidatelimit_missing_args(self):
1893 self.binary, "-cl",
1894 self.get_ref_image_path("LDR", "input", "A"),
1895 self.get_tmp_image_path("LDR", "comp"),
1900 self.exec_with_omit(command, 7)
1902 def test_cl_3partitioncandidatelimit_missing_args(self):
1908 self.binary, "-cl",
1909 self.get_ref_image_path("LDR", "input", "A"),
1910 self.get_tmp_image_path("LDR", "comp"),
1915 self.exec_with_omit(command, 7)
1918 def test_cl_4partitioncandidatelimit_missing_args(self):
1924 self.binary, "-cl",
1925 self.get_ref_image_path("LDR", "input", "A"),
1926 self.get_tmp_image_path("LDR", "comp"),
1931 self.exec_with_omit(command, 7)
1933 def test_cl_blockmodelimit_missing_args(self):
1939 self.binary, "-cl",
1940 self.get_ref_image_path("LDR", "input", "A"),
1941 self.get_tmp_image_path("LDR", "comp"),
1946 self.exec_with_omit(command, 7)
1948 def test_cl_refinementlimit_missing_args(self):
1954 self.binary, "-cl",
1955 self.get_ref_image_path("LDR", "input", "A"),
1956 self.get_tmp_image_path("LDR", "comp"),
1961 self.exec_with_omit(command, 7)
1963 def test_cl_dblimit_missing_args(self):
1969 self.binary, "-cl",
1970 self.get_ref_image_path("LDR", "input", "A"),
1971 self.get_tmp_image_path("LDR", "comp"),
1976 self.exec_with_omit(command, 7)
1978 def test_cl_2partitionearlylimit_missing_args(self):
1984 self.binary, "-cl",
1985 self.get_ref_image_path("LDR", "input", "A"),
1986 self.get_tmp_image_path("LDR", "comp"),
1991 self.exec_with_omit(command, 7)
1993 def test_cl_3partitionearlylimit_missing_args(self):
1999 self.binary, "-cl",
2000 self.get_ref_image_path("LDR", "input", "A"),
2001 self.get_tmp_image_path("LDR", "comp"),
2006 self.exec_with_omit(command, 7)
2008 def test_cl_2planeearlylimit_missing_args(self):
2014 self.binary, "-cl",
2015 self.get_ref_image_path("LDR", "input", "A"),
2016 self.get_tmp_image_path("LDR", "comp"),
2021 self.exec_with_omit(command, 7)
2023 def test_cl_esw_missing_args(self):
2029 self.binary, "-cl",
2030 self.get_ref_image_path("LDR", "input", "A"),
2031 self.get_tmp_image_path("LDR", "comp"),
2036 self.exec_with_omit(command, 7)
2038 def test_cl_esw_invalid_swizzle(self):
2058 self.binary, "-cl",
2059 self.get_ref_image_path("LDR", "input", "A"),
2060 self.get_tmp_image_path("LDR", "comp"),
2066 with self.subTest(swizzle=badSwizzle):
2068 self.exec(command)
2070 def test_cl_ssw_missing_args(self):
2076 self.binary, "-cl",
2077 self.get_ref_image_path("LDR", "input", "A"),
2078 self.get_tmp_image_path("LDR", "comp"),
2083 self.exec_with_omit(command, 7)
2085 def test_cl_ssw_invalid_swizzle(self):
2102 self.binary, "-cl",
2103 self.get_ref_image_path("LDR", "input", "A"),
2104 self.get_tmp_image_path("LDR", "comp"),
2110 with self.subTest(swizzle=badSwizzle):
2112 self.exec(command)
2114 def test_dl_dsw_missing_args(self):
2120 self.binary, "-dl",
2121 self.get_ref_image_path("LDR", "comp", "A"),
2122 self.get_tmp_image_path("LDR", "decomp"),
2126 self.exec_with_omit(command, 5)
2128 def test_dl_dsw_invalid_swizzle(self):
2148 self.binary, "-dl",
2149 self.get_ref_image_path("LDR", "comp", "A"),
2150 self.get_tmp_image_path("LDR", "decomp"),
2155 with self.subTest(swizzle=badSwizzle):
2157 self.exec(command)
2159 def test_ch_mpsnr_missing_args(self):
2165 self.binary, "-ch",
2166 self.get_ref_image_path("HDR", "input", "A"),
2167 self.get_tmp_image_path("HDR", "comp"),
2172 self.exec_with_omit(command, 7)