Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue47118

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:test_run_keeps_context in test_asyncio fails
Type:behaviorStage:resolved
Components:asyncio, TestsVersions:Python 3.11
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: asvetlov, serhiy.storchaka, yselivanov
Priority:normalKeywords:patch

Created on2022-03-25 14:20 byserhiy.storchaka, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 32117mergedasvetlov,2022-03-25 17:23
Messages (3)
msg416000 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2022-03-25 14:20
$ ./python -m test -vuall test_asyncio...======================================================================FAIL: test_run_keeps_context (test.test_asyncio.test_runners.RunnerTests)----------------------------------------------------------------------Traceback (most recent call last):  File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_runners.py", line 299, in test_run_keeps_context    self.assertEqual({cvar: 2}, dict(runner.run(get_context())))    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: {<Con[47 chars]0>: 2} != {<Con[47 chars]0>: 2, <ContextVar name='decimal_context' at 0[164 chars]ow])}- {<ContextVar name='cvar' default=-1 at 0x7f729c70e740>: 2}?                                                          ^+ {<ContextVar name='cvar' default=-1 at 0x7f729c70e740>: 2,?                                                          ^+  <ContextVar name='decimal_context' at 0x7f729d60e7b0>: Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999, Emax=999999, capitals=1, clamp=0, flags=[], traps=[InvalidOperation, DivisionByZero, Overflow])}----------------------------------------------------------------------When run the test separately it passes successfully.
msg416007 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2022-03-25 15:17
Thanks for the report!I read it ad 'decimal context tests modifies the environment'.I'll update asyncio runner test to ignore external contextvars.
msg416012 -(view)Author: Andrew Svetlov (asvetlov)*(Python committer)Date: 2022-03-25 17:59
New changeset20e6e5636a06fe5e1472062918d0a302d82a71c3 by Andrew Svetlov in branch 'main':bpo-47118: Fix asyncio.Runner tests error (32117)https://github.com/python/cpython/commit/20e6e5636a06fe5e1472062918d0a302d82a71c3
History
DateUserActionArgs
2022-04-11 14:59:57adminsetgithub: 91274
2022-03-25 18:19:02asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-03-25 17:59:47asvetlovsetmessages: +msg416012
2022-03-25 17:23:28asvetlovsetkeywords: +patch
stage: patch review
pull_requests: +pull_request30192
2022-03-25 15:17:49asvetlovsetmessages: +msg416007
2022-03-25 14:20:59serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp