From 99cf55bd7b61a46dd0fb66773f6fb5201ecfbda4 Mon Sep 17 00:00:00 2001 From: mio Date: Tue, 10 Sep 2024 05:25:47 +0000 Subject: [PATCH] community/py3-commentjson: fix test --- community/py3-commentjson/APKBUILD | 2 ++ .../update-test-skips-for-python-3.12.patch | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 community/py3-commentjson/update-test-skips-for-python-3.12.patch diff --git a/community/py3-commentjson/APKBUILD b/community/py3-commentjson/APKBUILD index 7a2556ec2db..0e9e8df5380 100644 --- a/community/py3-commentjson/APKBUILD +++ b/community/py3-commentjson/APKBUILD @@ -22,6 +22,7 @@ checkdepends=" subpackages="$pkgname-pyc" source=" $pkgname-$pkgver.tar.gz::https://github.com/vaidik/commentjson/archive/refs/tags/v$pkgver.tar.gz + update-test-skips-for-python-3.12.patch " builddir="$srcdir/commentjson-$pkgver" @@ -46,4 +47,5 @@ package() { sha512sums=" cd3d28adecbc445ed3faed7847c65a23829f408cf8aa3fa85544a0f0cf9fa5544b8aff560725cf51921f249123daf9ce9953069e99ca64a312bb4bff652512fe py3-commentjson-0.9.0.tar.gz +04c87f6cb556a0d59da728c9098b4e40a7878628ab85fb159928a4d7951b9eace22da63997825989368fafd7250decfd234b6a2f45496d86db091c5c0963cbdc update-test-skips-for-python-3.12.patch " diff --git a/community/py3-commentjson/update-test-skips-for-python-3.12.patch b/community/py3-commentjson/update-test-skips-for-python-3.12.patch new file mode 100644 index 00000000000..b6c4e4c72b7 --- /dev/null +++ b/community/py3-commentjson/update-test-skips-for-python-3.12.patch @@ -0,0 +1,26 @@ +Source: https://github.com/vaidik/commentjson/pull/54 +--- +From 04ad293f800039c0221ff010236e589a4ba7079d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 23 Jun 2024 14:54:42 +0200 +Subject: [PATCH] Update test skips for Python 3.12+ + +Python 3.12 moves testing for `Infinity` and other constants +into `test_json/test_decode.py::test_parse_constant`. +--- + commentjson/tests/test_json/test_decode.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/commentjson/tests/test_json/test_decode.py b/commentjson/tests/test_json/test_decode.py +index 6971c44..8f5e904 100644 +--- a/commentjson/tests/test_json/test_decode.py ++++ b/commentjson/tests/test_json/test_decode.py +@@ -69,3 +69,8 @@ def test_string_with_utf8_bom(self): + 'test case is not supported by commentjson.')) + def test_negative_index(self): + pass ++ ++ @unittest.skipIf(version >= (3, 12), ++ 'Infinity as a value is not supported yet') ++ def test_parse_constant(self): ++ pass