mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-07 18:07:08 -08:00
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From 4f916edb457eb02bede0a7c4a64741ef13709af7 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
|
Date: Wed, 12 Jun 2024 07:47:18 +0200
|
|
Subject: [PATCH] Fix tests for Python 3.13
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Fix expected argparse --help output to account for changes in Python
|
|
3.13.
|
|
|
|
Closes-Bug: 2069108
|
|
Change-Id: Ie221e5f5b369930f015a74998f50ddb473b53b94
|
|
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
---
|
|
oslo_config/tests/test_cfg.py | 10 ++++++++--
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py
|
|
index 926eb8c..f69f7a0 100644
|
|
--- a/oslo_config/tests/test_cfg.py
|
|
+++ b/oslo_config/tests/test_cfg.py
|
|
@@ -264,8 +264,14 @@ class HelpTestCase(BaseTestCase):
|
|
self.conf.register_cli_opt(uvw)
|
|
self.conf([])
|
|
self.conf.print_help(file=f)
|
|
- self.assertIn('--a-bc A_BC, --d-ef A_BC, --d_ef A_BC', f.getvalue())
|
|
- self.assertIn('--u-vw U_VW, --x-yz U_VW, --x_yz U_VW', f.getvalue())
|
|
+ if sys.version_info >= (3, 13):
|
|
+ self.assertIn('--a-bc, --d-ef, --d_ef A_BC', f.getvalue())
|
|
+ self.assertIn('--u-vw, --x-yz, --x_yz U_VW', f.getvalue())
|
|
+ else:
|
|
+ self.assertIn('--a-bc A_BC, --d-ef A_BC, --d_ef A_BC',
|
|
+ f.getvalue())
|
|
+ self.assertIn('--u-vw U_VW, --x-yz U_VW, --x_yz U_VW',
|
|
+ f.getvalue())
|
|
|
|
|
|
class FindConfigFilesTestCase(BaseTestCase):
|
|
--
|
|
2.45.2
|
|
|