Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-92886: Replace assertion statements inhandlers.BaseHandler to support running with optimizations (-O)#93231

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iritkatriel merged 6 commits intopython:mainfromjackh-ncl:92886-wsgiref
Oct 19, 2022

Conversation

jackh-ncl
Copy link
Contributor

@jackh-ncljackh-ncl commentedMay 25, 2022
edited by bedevere-bot
Loading

Replace assert statements withraise AssertionError() so that behaviour is maintained andtest_wsgiref.py tests pass while running with optimizations (-O).

#92886

Before:

$ ./python.exe -Om unittest test.test_wsgiref.......................FFF...........======================================================================FAIL: test_status_validation_errors (test.test_wsgiref.IntegrationTests.test_status_validation_errors) (status='200')----------------------------------------------------------------------Traceback (most recent call last):  File"/Users/.../dev/cpython/Lib/test/test_wsgiref.py", line 177,in test_status_validation_errors    self.assertTrue(out.endswith(    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: False is nottrue======================================================================FAIL: test_status_validation_errors (test.test_wsgiref.IntegrationTests.test_status_validation_errors) (status='20X OK')----------------------------------------------------------------------Traceback (most recent call last):  File"/Users/.../dev/cpython/Lib/test/test_wsgiref.py", line 177,in test_status_validation_errors    self.assertTrue(out.endswith(    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: False is nottrue======================================================================FAIL: test_status_validation_errors (test.test_wsgiref.IntegrationTests.test_status_validation_errors) (status='200OK')----------------------------------------------------------------------Traceback (most recent call last):  File"/Users/.../dev/cpython/Lib/test/test_wsgiref.py", line 177,in test_status_validation_errors    self.assertTrue(out.endswith(    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: False is nottrue----------------------------------------------------------------------Ran 35 testsin 0.039sFAILED (failures=3)

After:

$ ./python.exe -Om unittest test.test_wsgiref...................................----------------------------------------------------------------------Ran 35 testsin 0.030sOK

Replace assert statements with `raise AssertionError()` so that behaviour is maintained and `test_wsgiref.py` tests pass while running with optimizations (`-O`).
@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

@jackh-ncljackh-ncl marked this pull request as ready for reviewMay 25, 2022 22:10
jackh-ncland others added2 commitsOctober 18, 2022 17:08
…wDSc.rstCo-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@iritkatrieliritkatriel merged commitb6e59d7 intopython:mainOct 19, 2022
carljm added a commit to carljm/cpython that referenced this pull requestOct 20, 2022
* main: (40 commits)pythongh-98461: Fix source location in comprehensions bytecode (pythonGH-98464)pythongh-98421: Clean Up PyObject_Print (pythonGH-98422)pythongh-98360: multiprocessing now spawns children on Windows with correct argv[0] in virtual environments (pythonGH-98462)  CODEOWNERS: Become a typing code owner (python#98480)  [doc] Improve logging cookbook example. (pythonGH-98481)  Add more tkinter.Canvas tests (pythonGH-98475)pythongh-95023: Added os.setns and os.unshare functions (python#95046)pythonGH-98363: Presize the list for batched() (pythonGH-98419)pythongh-98374: Suppress ImportError for invalid query for help() command. (pythongh-98450)  typing tests: `_overload_dummy` raises `NotImplementedError`, not `RuntimeError` (python#98351)pythongh-98354: Add unicode check for 'name' attribute in _imp_create_builtin (pythonGH-98412)pythongh-98257: Make _PyEval_SetTrace() reentrant (python#98258)pythongh-98414: py.exe launcher does not use defaults for -V:company/ option (pythonGH-98460)pythongh-98417: Store int_max_str_digits on the Interpreter State (pythonGH-98418)  Doc: Remove title text from internal links (python#98409)  [doc] Refresh the venv introduction documentation, and correct the statement about VIRTUAL_ENV (pythonGH-98350)  Docs: Bump sphinx-lint and fix unbalanced inline literal markup (python#98441)pythongh-92886: Replace assertion statements in `handlers.BaseHandler` to support running with optimizations (`-O`) (pythonGH-93231)pythongh-92886: Fix tests that fail when running with optimizations (`-O`) in `_test_multiprocessing.py` (pythonGH-93233)pythongh-92886: Fix tests that fail when running with optimizations (`-O`) in `test_py_compile.py` (pythonGH-93235)  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jackh-ncl@bedevere-bot@iritkatriel

[8]ページ先頭

©2009-2025 Movatter.jp