diff options
author | Sam James <sam@gentoo.org> | 2023-02-09 00:56:24 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-09 00:57:18 +0000 |
commit | 682e928678ce1fd48d8a4330d70875bc8c37ace6 (patch) | |
tree | c4e1c883129ef25d8e8c13ad7a62cc59fd9123c7 | |
parent | sys-apps/groff: skip broken test w/ diffutils-3.9 (diff) | |
download | gentoo-682e928678ce1fd48d8a4330d70875bc8c37ace6.tar.gz gentoo-682e928678ce1fd48d8a4330d70875bc8c37ace6.tar.bz2 gentoo-682e928678ce1fd48d8a4330d70875bc8c37ace6.zip |
dev-python/astor: fix tests w/ newer Pythons (bigint handling)
Closes: https://bugs.gentoo.org/868711
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dev-python/astor/astor-0.8.1-r1.ebuild | 4 | ||||
-rw-r--r-- | dev-python/astor/files/astor-0.8.1-tests-bigint.patch | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dev-python/astor/astor-0.8.1-r1.ebuild b/dev-python/astor/astor-0.8.1-r1.ebuild index 9f74edb0c2fb..c7baf5cf609c 100644 --- a/dev-python/astor/astor-0.8.1-r1.ebuild +++ b/dev-python/astor/astor-0.8.1-r1.ebuild @@ -16,6 +16,10 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86" +PATCHES=( + "${FILESDIR}"/${P}-tests-bigint.patch +) + distutils_enable_tests pytest EPYTEST_IGNORE=( diff --git a/dev-python/astor/files/astor-0.8.1-tests-bigint.patch b/dev-python/astor/files/astor-0.8.1-tests-bigint.patch new file mode 100644 index 000000000000..777e9390b9bf --- /dev/null +++ b/dev-python/astor/files/astor-0.8.1-tests-bigint.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/868711 +https://github.com/berkerpeksag/astor/commit/8342d6aa5dcdcf20f89a19057527510c245c7a2e + +From 8342d6aa5dcdcf20f89a19057527510c245c7a2e Mon Sep 17 00:00:00 2001 +From: Jochen Sprickerhof <jspricke@debian.org> +Date: Fri, 30 Dec 2022 14:47:57 +0100 +Subject: [PATCH] Reduce huge int in test (Closes: #212) + +Int was above limits: + +https://docs.python.org/3/library/stdtypes.html#int-max-str-digits +--- a/tests/test_code_gen.py ++++ b/tests/test_code_gen.py +@@ -291,7 +291,7 @@ def test_with(self): + self.assertAstRoundtripsGtVer(source, (2, 7)) + + def test_huge_int(self): +- for n in (10**10000, ++ for n in (10**1000, + 0xdfa21cd2a530ccc8c870aa60d9feb3b35deeab81c3215a96557abbd683d21f4600f38e475d87100da9a4404220eeb3bb5584e5a2b5b48ffda58530ea19104a32577d7459d91e76aa711b241050f4cc6d5327ccee254f371bcad3be56d46eb5919b73f20dbdb1177b700f00891c5bf4ed128bb90ed541b778288285bcfa28432ab5cbcb8321b6e24760e998e0daa519f093a631e44276d7dd252ce0c08c75e2ab28a7349ead779f97d0f20a6d413bf3623cd216dc35375f6366690bcc41e3b2d5465840ec7ee0dc7e3f1c101d674a0c7dbccbc3942788b111396add2f8153b46a0e4b50d66e57ee92958f1c860dd97cc0e40e32febff915343ed53573142bdf4b): + self.assertEqual(astornum(n), n) + + |