Accepting request 1204076 from systemsmanagement:wbem
OBS-URL: https://build.opensuse.org/request/show/1204076 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pywbem?expand=0&rev=23
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 26 06:02:23 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-new-testfixtures.patch:
|
||||||
|
* Support testfixtures >= 8.3.0.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 13 03:49:48 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
Mon May 13 03:49:48 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -26,6 +26,8 @@ License: LGPL-2.1-or-later
|
|||||||
Group: System/Management
|
Group: System/Management
|
||||||
URL: https://pywbem.github.io/
|
URL: https://pywbem.github.io/
|
||||||
Source0: https://github.com/pywbem/pywbem/archive/%{version}.tar.gz#/pywbem-%{version}.tar.gz
|
Source0: https://github.com/pywbem/pywbem/archive/%{version}.tar.gz#/pywbem-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM Based on gh#pywbem/pywbem#3217
|
||||||
|
Patch0: support-new-testfixtures.patch
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools >= 38.4.1}
|
BuildRequires: %{python_module setuptools >= 38.4.1}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
|
55
support-new-testfixtures.patch
Normal file
55
support-new-testfixtures.patch
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
From f6acfc45af0c8b5b592890a3ff222708902f2ae7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Maier <andreas.r.maier@gmx.de>
|
||||||
|
Date: Mon, 19 Aug 2024 18:29:10 +0200
|
||||||
|
Subject: [PATCH] Test: In test_recorder.py avoid a new AssertionError by
|
||||||
|
testfixtures 8.3.0
|
||||||
|
|
||||||
|
Details:
|
||||||
|
|
||||||
|
* The setup_method() in BaseLogOperationRecorderTests had called
|
||||||
|
logging.shutdown() which triggered a new AssertionError raised by
|
||||||
|
testfixtures 8.3.0 that complains about LogCapture handlers being closed
|
||||||
|
but still installed.
|
||||||
|
|
||||||
|
Uninstalling the LogCapture handlers via LogCapture.uninstall_all()
|
||||||
|
introduced the new problem that logging was not performed correctly
|
||||||
|
anymore.
|
||||||
|
|
||||||
|
The solution seems to be to not call logging.shutdown() in setup_method(),
|
||||||
|
which is also understandable given that it is only supposed to be used
|
||||||
|
before exiting the program.
|
||||||
|
|
||||||
|
Note that we still call it in teardown_method().
|
||||||
|
|
||||||
|
Fixed steps to start new version; removed types from _version.py
|
||||||
|
|
||||||
|
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
|
||||||
|
---
|
||||||
|
docs/changes.rst | 4 ++--
|
||||||
|
test-requirements.txt | 7 +------
|
||||||
|
tests/unittest/pywbem/test_recorder.py | 9 ++++-----
|
||||||
|
3 files changed, 7 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
ddiff --git a/tests/unittest/pywbem/test_recorder.py b/tests/unittest/pywbem/test_recorder.py
|
||||||
|
index be618fe15..f7eb1797a 100755
|
||||||
|
--- a/tests/unittest/pywbem/test_recorder.py
|
||||||
|
+++ b/tests/unittest/pywbem/test_recorder.py
|
||||||
|
@@ -1620,14 +1620,13 @@ def setup_method(self):
|
||||||
|
"""
|
||||||
|
Setup that is run before each test method.
|
||||||
|
"""
|
||||||
|
- # Shut down any existing logger and reset WBEMConnection and
|
||||||
|
- # reset WBEMConnection class attributes
|
||||||
|
- # pylint: disable=protected-access
|
||||||
|
- WBEMConnection._reset_logging_config()
|
||||||
|
- logging.shutdown()
|
||||||
|
+ # Reset WBEMConnection logging.
|
||||||
|
# NOTE We do not clean up handlers or logger names already defined.
|
||||||
|
# That should not affect the tests.
|
||||||
|
|
||||||
|
+ # pylint: disable=protected-access
|
||||||
|
+ WBEMConnection._reset_logging_config()
|
||||||
|
+
|
||||||
|
def recorder_setup(self, detail_level=None):
|
||||||
|
"""
|
||||||
|
Setup the recorder for a defined max output size
|
Reference in New Issue
Block a user