Skip to content

test_PolyLineROI now passes on non-AMD64 platforms#2999

Merged
j9ac9k merged 3 commits intopyqtgraph:masterfrom
j9ac9k:fix-test_PolyLineROI_on_arm64
Apr 27, 2024
Merged

test_PolyLineROI now passes on non-AMD64 platforms#2999
j9ac9k merged 3 commits intopyqtgraph:masterfrom
j9ac9k:fix-test_PolyLineROI_on_arm64

Conversation

@j9ac9k
Copy link
Copy Markdown
Member

@j9ac9k j9ac9k commented Apr 21, 2024

The test suite now passes due to using a forgiving pxCount values when the test suite is running on not on platform.machine() == 'AMD64'.

Did formatting changes to test_PolyLineROI and migrated the for loop to instead use pytest.mark.parametrize

Question now is, is this the "fix" we want to have?

An alternative would be to add new images for arm based platforms to test against.

Fixes #2998

@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Apr 21, 2024

pxCount=0 if platform.machine() == "AMD64" else 36

😬

@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 14 times, most recently from e40ae64 to 84199f7 Compare April 25, 2024 02:38
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 2 times, most recently from 4ca2ba6 to 16683b0 Compare April 25, 2024 02:48
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 2 times, most recently from f20937e to 6ffb771 Compare April 25, 2024 11:44
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch from 6ffb771 to 26aa153 Compare April 25, 2024 12:16
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 6 times, most recently from 21ba75e to 66bac6f Compare April 25, 2024 20:39
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 2 times, most recently from 77bf5a7 to 18610b1 Compare April 25, 2024 21:18
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch from 18610b1 to a08b009 Compare April 25, 2024 21:24
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 6 times, most recently from f31e916 to 1b07da9 Compare April 27, 2024 01:37
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 2 times, most recently from 0ba13e8 to 83d8707 Compare April 27, 2024 01:56
j9ac9k added 2 commits April 26, 2024 21:56
The major source of the discrepancy of the images came from AntiAliasing
This commit adds an attribute to ROIs and Handles, ._antialias, which is
True by default, but anti-aliasing will be disabled when that attribute
is set to False. The ROIs and Handles used in the test suite are set to
have this attribute set to False, thus disabling the use of
anti-aliasing.

This change also required that I generate new baseline test images,
which are included in the commit.

Because of disabling anti-aliasing, the pxCount value for image
comparison checker are substantially lower.
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 6 times, most recently from 9e9b219 to 201f92e Compare April 27, 2024 02:26
@j9ac9k
Copy link
Copy Markdown
Member Author

j9ac9k commented Apr 27, 2024

ok, done tinkering, I think this PR is ready. I wish I had a better idea why the segfault in make_ARGB, but setting the im1 arrays to read only seems to resolve whatever the issue is there.

@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch 3 times, most recently from 0869271 to e3549c6 Compare April 27, 2024 13:05
Instead of having loops inside tests, use the pytest.mark.parametrize
feature of pytest. This allows for far better readability of test
failures, and a lot of duplicated code is removed.
@j9ac9k j9ac9k force-pushed the fix-test_PolyLineROI_on_arm64 branch from e3549c6 to 955a8fb Compare April 27, 2024 17:45
@j9ac9k j9ac9k merged commit 69fd747 into pyqtgraph:master Apr 27, 2024
@j9ac9k j9ac9k deleted the fix-test_PolyLineROI_on_arm64 branch April 27, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure on test_PolyLineROI on arm64

1 participant