-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add test_async_returnvalue to test_other.py. NFC #26092
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
Draft
sbc100
wants to merge
1
commit into
emscripten-core:main
Choose a base branch
from
sbc100:async_tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bunch of duplicated code with test_browser. Maybe we can just test this outside of the browser in the other file? That is, right after
self.btestthere, we can addself.do_runf?Or, perhaps we can find a nice way to share such logic between browser and non-browser?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Specifically, I worry that we update one test over time, improving it, but forget to update the other version in the other file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I share this concern, but also this is not a new things. We have many quite a few tests that are run both in browserpy and in other.py or core.py.
I agree it would be nice to have better way to express this duplication.
Also, how do we decide which tests should run in the browser at all? This test, for example, is not testing anything browser specific? Does that mean we should not run it under the browser?
Perhaps we should allow certain tests in test_other.py and test_core.py to be tagged as "@also_run_in_browser" ? Or perhaps we should run all
other.pyorcore.pytests in the browser in certain CI configs.All of this sounds quick complicated though...
My general feeling is if a test can run outside the browser then there should be a way to run it outside the browser. We have have a way to run browser tests using
--browser=node.. maybe we should push more on that option?I'll leave this PR as a draft for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea to lean on
--browser=nodemore. maybe a decorator could make a browser test also run in that mode, something like that - hopefully that is simple?