Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37786523
en ru br
Репозитории ALT

Группа :: Development/Python3
Пакет: python3-module-oslo.config

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: fix-oslo.config-test-under-bullseye.patch
Скачать


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):
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin