parameterized test coroutines not running in lunar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
Fix Committed
|
Undecided
|
Dan Bungert | ||
python-parameterized (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
python3.11 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have upgraded my desktop to lunar recently, which pulls Python 3.11.
The subiquity unit tests look all green, but all tests that use coroutines + parameterized don't actually run the coroutine. The presence of warnings makes it more or less obvious.
excerpt
-------
subiquity/
/usr/
if self._callMaybe
Enable tracemalloc to get traceback where the object was allocated.
See https:/
subiquity/
/usr/
return self.run(*args, **kwds)
subiquity/
/usr/
return self.run(*args, **kwds)
subiquity/
/usr/
return self.run(*args, **kwds)
[...]
simple reproducer
-----------------
import unittest
from parameterized import parameterized
class TestParameteriz
def test_function_
async def test_coroutine_
@parameteri
def test_function_
@parameteri
async def test_coroutine_
In Python3.10 and lower, all 4 tests "fail" with "This test ran properly".
In Python3.11, the last test "succeeds" and produces the following warnings:
/usr/lib/
if self._callMaybe
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/
return self.run(*args, **kwds)
Tested with python3 -m unittest and python3 -m nose with the same result.
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in subiquity: | |
assignee: | nobody → Dan Bungert (dbungert) |
status: | New → In Progress |
Likely related: /github. com/python/ cpython/ issues/ 101486 /github. com/wolever/ parameterized/ issues/ 137
https:/
https:/