aboutsummaryrefslogtreecommitdiff
path: root/doc/source/admin
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2025-05-20 12:17:25 +0200
committerMichal Arbet <michal.arbet@ultimum.io>2025-05-21 14:58:57 +0200
commite13801b4a1e5f587ee0581168eea0d42fea6cb66 (patch)
tree4cd0ae40367f0c9405e229152d67d51cbd9d2468 /doc/source/admin
parent0006320d98fa7e594fbd17ade36d2572ca3231ed (diff)
downloadkolla-e13801b4a1e5f587ee0581168eea0d42fea6cb66.tar.gz
kolla-e13801b4a1e5f587ee0581168eea0d42fea6cb66.zip
Fix mock_open() expectations for Python 3.13+
Python 3.13 introduces a behavior change in unittest.mock.mock_open(), which now calls close() when exiting the context manager as described in bpo-44185 [1]. This causes additional mock calls to appear, breaking strict mock_calls assertions. This patch fix tests and add compatibility for Python 3.13. From mock documentation [2]: "bpo-44185: unittest.mock.mock_open() will call the close() method of the file handle mock when it is exiting from the context manager. Patch by Samet Yaslan." [1] https://bugs.python.org/issue44185 [2] https://mock.readthedocs.io/en/latest/changelog.html Change-Id: Ib8e2a8a20a828c4c69deedd307c9b726f51489f8
Diffstat (limited to 'doc/source/admin')
0 files changed, 0 insertions, 0 deletions