Skip to content

Conversation

@jepler
Copy link

@jepler jepler commented Oct 28, 2024

I noticed #9753 and thought: wouldn't it be nice if we could test it on host computers. It turned out to be relatively easy to add the vectorio module to unix coverage builds.

$ ./build-coverage/micropython 
CircuitPython 9.2.0-rc.0-1-g2f1102da6a-dirty on 2024-10-28; linux [GCC 12.2.0] version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import displayio, vectorio
>>> palette = displayio.Palette(1)
>>> circle = vectorio.Circle(pixel_shader=palette, radius=25, x=70, y=40)
>>> circle.contains(0,0)
False
>>> circle.contains(74-24, 40)
True
>>> circle.contains(74-26, 40)
True

this would enable writing tests of vectorio features (other than rendering anyway) that can run during CI on a host computer.

@jepler jepler requested a review from FoamyGuy October 28, 2024 13:14
Copy link
Collaborator

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! Thanks for adding this.

I tested it successfully with a unix port build locally. (my first time building the unix port 🎉 )

@jepler jepler merged commit 68fac95 into adafruit:main Oct 29, 2024
466 checks passed
@jepler jepler deleted the vectorio-testing branch October 29, 2024 01:14
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.

2 participants