-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add tests for asyncio #58
base: main
Are you sure you want to change the base?
Conversation
I was able to run these tests by running the following (with circuitpython cloned)
This leads to the results:
If I instead point it at Python3 and CPython's asyncio I get some failures but that's to be expected because, well, it differs quite a bit in the behavior. |
Also, this build is failing because the expected output files don't have a license but if I add a license then they no longer match my expected outputs.. |
d899635
to
6c21d0f
Compare
Added a new github actions test runner and modified it to add licensing information because otherwise |
6c21d0f
to
c457e54
Compare
5994c84
to
7e8bfde
Compare
What would you think about making circuitpython being a submodule of this module, so you could keep the test code and results in sync with what circuitpython is using? Updating these tests when the tests change is a chore. |
The problem is creating new tests for new features, right? If I am making a new feature like queue, how would I add tests in that scenario? |
I would say add your extra tests in the circuitpython repo. We have added a number of extra tests for CircuitPython only, and these are just more. But this is a chicken and egg problem. The circuitpython CI already runs the tests against a particular commit of this library as a submodule in the circuitpython library. Conversely, you are running the same (+ more tests that you added) against (the latest?) circuitpython. Maybe that should be a particular commit of circuitpython instead of latest. You could make circuitpython a submodule of this repo, but then you have mutually recursive submodules, which sounds like a bad idea. (Recursive git clone will run forever?!) So maybe the circuitpython commit to use should not be specified as a submodule, but just as a git commit-ish (SHA or tag) stored somewhere to be used by the CI test runner. (BTW, how are you running the tests manually locally in this repo? Could you document that?) MicroPython keeps the source of the Python asyncio library in the micropython repo. That makes it easy for MicroPython to keep the tests in sync, but makes it hard to install the library independently. I factored this library out so it could be updated and installed independently. |
I can do this but it means new features like Queue won't be tested -- or when fixes in
Agreed.
I will add the version tags we care about to the CI so it runs against multiple versions, that way it isn't always going against
I have a built version of
|
Should circuitpython's CI be updated to run the tests out of this repo? |
I tried to add 8.2.7 but that seems to have a segmentation fault when running against the tests? When I checked 8.2.7 in the circuitpython repo it doesn't run the asyncio tests |
1407041
to
8fcb511
Compare
8fcb511
to
a9bd936
Compare
converts most of the tests from circuitpython's repository into tests that can be run in this repository for each pull request
creates a simple runner that can be used to validate tests
adds a github action which runs the tests for pull requests via the latest circuitpython build