-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-131178: Add tests for http.server command-line interface #132540
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
base: main
Are you sure you want to change the base?
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
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 haven't read everything carefully yet, but this is what catches my eye first
Misc/NEWS.d/next/Library/2025-04-15-12-47-09.gh-issue-131178.Td8j5x.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
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.
While mocking seems fine, I feel that we're just checking how the test function is being called, but we're not testing whether it works or not.
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Semyon Moroz <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
@picnixz Thanks for your review! I use mock instead of testing the whole server because starting a real HTTP server would take much more time. Also, the result might be influenced by other applications and processes. We can assume that the server will work normally if we call the test function correctly because we have already tested the |
IIRC, there are tests that use real servers (but correct me if I'm wrong), and we have a helper for finding the next available port in case. I don't think the tests will take long. It's just about serving files over HTTPS. However, just check that we're indeed covering everything in |
#131178