Merge ~pkopylov/qa-regression-testing:fix-test-lcms2 into qa-regression-testing:master

Proposed by Pavel Kopylov
Status: Merged
Merged at revision: 8f95ecf98028f609695b5d9197eeb9daed7d51de
Proposed branch: ~pkopylov/qa-regression-testing:fix-test-lcms2
Merge into: qa-regression-testing:master
Diff against target: 13 lines (+1/-1)
1 file modified
scripts/test-lcms2.py (+1/-1)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+436592@code.launchpad.net

Commit message

scripts/test-lcms2.py: file type assertion of the color profile
should not be strict.

Description of the change

The file type descriptions can contain some additional information, so strict test mode is not appropriate there. Fortunately, it works on Ubuntu16.04 but it doesn't work in strict mode on Ubuntu18.04.

Moreover, I had to correct the pattern string to make the test work. I don't include that correction in this commit.

Here is the output on Ubuntu16.04:
----------------- Begin console output -----------------
root@unassigned-hostname:~# file -bkr /tmp/output.icc
ColorSync ICC Profile
- ICC Profile
- data
------------------ End console output ------------------

Here is the output on Ubuntu18.04 in my case:
----------------- Begin console output -----------------
root@qa-tests:~# file -bkr /tmp/output.icc
ColorSync color profile 4.3, type lcms, RGB/XYZ-link device by lcms, 216756 bytes, 31-1-2023 11:39:12 'Devicelink profilelc'
- data
------------------ End console output ------------------

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

LGTM - thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/test-lcms2.py b/scripts/test-lcms2.py
2index 8b0b204..5befba0 100755
3--- a/scripts/test-lcms2.py
4+++ b/scripts/test-lcms2.py
5@@ -143,7 +143,7 @@ class LcmsTest(testlib.TestlibCase):
6 else:
7 mime_type = 'ColorSync ICC Profile'
8
9- self.assertFileType(output_file, mime_type)
10+ self.assertFileType(output_file, mime_type, strict=False)
11
12 def test_icc_convert(self):
13 '''Convert color spaces without error'''

Subscribers

People subscribed via source and target branches