Skip to content
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 basic integration tests #164

Merged
merged 12 commits into from
Dec 7, 2024
Merged

Conversation

ryanking13
Copy link
Member

This adds basic integration tests for micropip, which queries to real world packages indexes (PyPI).

To prevent DoS, this is disabled by default in PR, and only run when [integration] is included in the PR or when the PR is merged and pushed to the main branch.



def test_integration_install_basic(selenium_standalone_micropip, pytestconfig):
pytestconfig.getoption("--integration", skip=True)
Copy link
Member

Choose a reason for hiding this comment

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

Can we make a separate fixture or decorator for this so that we can say:

@integration_only
@run_in_pyodide
def test_integration_install_basic(selenium_standalone_micropip):
    # test body

Or maybe it would be possible to skip the entire file instead of each test individually?

@@ -1,7 +1,7 @@
# This file contains tests that actually query remote package indexes,
# to ensure that micropip works with real-world package indexes.
# Since running these tests will send many requests to remote servers,
# these tests are disabled by default.
# these tests are disabled by default in CI.
Copy link
Member

Choose a reason for hiding this comment

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

Above you said: "To run these tests locally, add --integration flag". Here you say they are disabled by default in CI. But aren't they are also disabled by default locally?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, they are disabled both locally and CI by default. I'll update the wording

Copy link
Member

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

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

Thanks @ryanking13! I have some nits but generally looks good.

@ryanking13
Copy link
Member Author

Thanks for the review!

@ryanking13 ryanking13 merged commit f02e8b9 into pyodide:main Dec 7, 2024
6 checks passed
@ryanking13 ryanking13 deleted the integration-test branch December 7, 2024 10:29
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