Skip tests that fail on Python 3.12

This commit is contained in:
Miro Hrončok 2023-06-28 18:53:04 +02:00
parent 3fa54cc722
commit 2d37615c35
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,42 @@
From 1c75d61d662126d861e3055db9f7619d5d374682 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Wed, 28 Jun 2023 18:50:56 +0200
Subject: [PATCH] Skip tests that fail on Python 3.12
---
test/test.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/test.py b/test/test.py
index 75e281c..26808e1 100755
--- a/test/test.py
+++ b/test/test.py
@@ -1288,21 +1288,25 @@ class TestBashGlobal(TestBash):
self.assertEqual(self.sh.run_command(command), 'arg\r\n')
@unittest.skipIf(os.uname()[0] == "Darwin", "Skip test that fails on MacOS")
+ @unittest.skipIf(sys.version_info >= (3, 12), "Skip test that fails on Python 3.12")
def test_console_script_module(self):
"""Test completing a console_script for a module."""
self._test_console_script()
@unittest.skipIf(os.uname()[0] == "Darwin", "Skip test that fails on MacOS")
+ @unittest.skipIf(sys.version_info >= (3, 12), "Skip test that fails on Python 3.12")
def test_console_script_package(self):
"""Test completing a console_script for a package."""
self._test_console_script(package=True)
@unittest.skipIf(os.uname()[0] == "Darwin", "Skip test that fails on MacOS")
+ @unittest.skipIf(sys.version_info >= (3, 12), "Skip test that fails on Python 3.12")
def test_console_script_module_wheel(self):
"""Test completing a console_script for a module from a wheel."""
self._test_console_script(wheel=True)
@unittest.skipIf(os.uname()[0] == "Darwin", "Skip test that fails on MacOS")
+ @unittest.skipIf(sys.version_info >= (3, 12), "Skip test that fails on Python 3.12")
def test_console_script_package_wheel(self):
"""Test completing a console_script for a package from a wheel."""
self._test_console_script(package=True, wheel=True)
--
2.40.1

View File

@ -17,6 +17,11 @@ Source0: %pypi_source argcomplete
# this patch removes it
Patch1: 0001-Remove-commit-hash-from-Fish-version.patch
# Some tests fail with Python 3.12
# This has been reported upstream: https://github.com/kislyuk/argcomplete/issues/440
# Upstream already skips those on MacOS, so we skip them as well
Patch2: 0002-Skip-tests-that-fail-on-Python-3.12.patch
BuildRequires: python3-devel
BuildRequires: python3-setuptools