python3.11 unit test failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
New
|
Undecided
|
Unassigned |
Bug Description
There are 3 test failures with python3.11:
=======
FAILED test/unit/
FAILED test/unit/
FAILED test/unit/
====== 3 failed, 6566 passed, 1809 skipped, 17783 warnings in 586.14s (0:09:46) ======
=======
platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0 -- /home/corey/
cachedir: .tox/py3/
rootdir: /home/corey/
plugins: cov-4.0.0, requests-
collected 8378 items / 8375 deselected / 3 selected
run-last-failure: rerun previous 3 failures
test/unit/
test/unit/
test/unit/
=======
___________________ TestGreenDBConn
self = <test.unit.
def test_execute_
# This test is dependent on the code under test calling execute and
# commit as sqlite3.
class InterceptCursor
pass
db_error = sqlite3.
with patch('
conn = sqlite3.
> self.assertRais
E AssertionError: Timeout not raised by execute
test/unit/
_______
self = <test.unit.
def test_get(self):
broker = DatabaseBroker(
with self.assertRais
"DB connection error (:memory:, 0):\nDB doesn't exist")
broker = DatabaseBroker(
with self.assertRais
"DB connection error (%s, 0):\nDB doesn't exist" % broker.db_file)
def stub(*args, **kwargs):
pass
with broker.get() as conn:
try:
with broker.get() as conn:
except Exception:
pass
broker = DatabaseBroker(
with broker.get() as conn:
with broker.get() as conn:
broker = DatabaseBroker(
with broker.get() as conn:
dbpath = os.path.
qpath = os.path.
with patch('
# Test malformed database
broker = DatabaseBroker(
> with self.assertRais
E AssertionError: DatabaseError not raised
test/unit/
_______
self = <test.unit.
def test_lock(self):
broker = DatabaseBroker(
with self.assertRais
pass
"DB connection error (%s, 0):\nDB doesn't exist" % broker.db_file)
def stub(*args, **kwargs):
pass
with broker.lock():
pass
with broker.lock():
pass
with self.assertRais
raise RuntimeError(
broker2 = DatabaseBroker(
with broker.lock():
# broker2 raises the timeout
with self.assertRais
> with broker2.lock():
test/unit/
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/
return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@contextmanager
def lock(self):
"""Use with the "with" statement; locks a database."""
if not self.conn:
if self.db_file != ':memory:' and os.path.
else:
conn = self.conn
self.conn = None
> conn.execute('BEGIN IMMEDIATE')
E sqlite3.
swift/common/
=======
.tox/py3/
/home/
preserves_
.tox/py3/
/home/
>= distutils.
swift/common/
/home/
from cgi import parse_header
test/unit/
/home/
class TestReplicator(
test/unit/
/home/
class TestResponse(
-- Docs: https:/
---------- coverage: platform linux, python 3.11.1-final-0 -----------
...
=======
FAILED test/unit/
================== 3 failed, 8375 deselected, 5 warnings in 30.84s =================== ERROR: InvocationError for command /usr/bin/bash -ec 'pytest test/unit || pytest --last-failed test/unit' (exited with code 1) _______
description: | updated |