Group :: Development/Python3
RPM: python3-module-oslo.config
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: fix-oslo.config-test-under-bullseye.patch
Download
Download
Description: Fix oslo.config tests under bullseye
Author: Thomas Goirand <zigo@debian.org>
Forwarded: not-needed
Last-Update: 2022-09-27
Index: python-oslo.config/oslo_config/tests/test_cfg.py
===================================================================
--- python-oslo.config.orig/oslo_config/tests/test_cfg.py
+++ python-oslo.config/oslo_config/tests/test_cfg.py
@@ -5080,8 +5080,12 @@ class DeprecationWarningTests(Deprecatio
'option': current_name,
'group': current_group}
)
- self.assertEqual(self.log_prefix + expected + '\n',
- self.log_fixture.output)
+ try:
+ self.assertEqual(self.log_prefix + expected + '\n',
+ self.log_fixture.output)
+ except:
+ self.assertEqual("Deprecated: " + self.log_prefix + expected + '\n',
+ self.log_fixture.output)
def test_deprecated_for_removal(self):
self.conf.register_opt(cfg.StrOpt('foo',
@@ -5100,7 +5104,10 @@ class DeprecationWarningTests(Deprecatio
expected = ('Option "foo" from group "DEFAULT" is deprecated for '
'removal. Its value may be silently ignored in the '
'future.\n')
- self.assertEqual(self.log_prefix + expected, self.log_fixture.output)
+ try:
+ self.assertEqual(self.log_prefix + expected, self.log_fixture.output)
+ except:
+ self.assertEqual("Deprecated: " + self.log_prefix + expected, self.log_fixture.output)
def test_deprecated_for_removal_with_group(self):
self.conf.register_group(cfg.OptGroup('other'))
@@ -5122,7 +5129,10 @@ class DeprecationWarningTests(Deprecatio
expected = ('Option "foo" from group "other" is deprecated for '
'removal. Its value may be silently ignored in the '
'future.\n')
- self.assertEqual(self.log_prefix + expected, self.log_fixture.output)
+ try:
+ self.assertEqual(self.log_prefix + expected, self.log_fixture.output)
+ except:
+ self.assertEqual("Deprecated: " + self.log_prefix + expected, self.log_fixture.output)
def test_deprecated_with_dest(self):
self.conf.register_group(cfg.OptGroup('other'))
@@ -5141,7 +5151,10 @@ class DeprecationWarningTests(Deprecatio
'dep_group': 'other',
'option': 'foo-bar',
'group': 'other'} + '\n')
- self.assertEqual(self.log_prefix + expected, self.log_fixture.output)
+ try:
+ self.assertEqual(self.log_prefix + expected, self.log_fixture.output)
+ except:
+ self.assertEqual("Deprecated: " + self.log_prefix + expected, self.log_fixture.output)
class DeprecationWarningTestsNoOsloLog(DeprecationWarningTests):