[New-bugs-announce] [issue47118] test_run_keeps_context in test_asyncio fails

Serhiy Storchaka report at bugs.python.org
Fri Mar 25 10:20:59 EDT 2022


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

$ ./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.

----------
components: Tests, asyncio
messages: 416000
nosy: asvetlov, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: test_run_keeps_context in test_asyncio fails
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47118>
_______________________________________


More information about the New-bugs-announce mailing list