mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/random2: python3_9, enable tests in the first place, pass
Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
32
dev-python/random2/files/random2-1.0.1-py39-tests.patch
Normal file
32
dev-python/random2/files/random2-1.0.1-py39-tests.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From a60d5ce10e5df0cebd7e7de0bff6f291bf9403ca Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
Date: Sat, 24 Oct 2020 20:57:00 +0200
|
||||
Subject: [PATCH] getrandbits() accepts 0 in python3_9
|
||||
|
||||
---
|
||||
src/tests.py | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/src/tests.py b/src/tests.py
|
||||
index d918891..6f600ab 100644
|
||||
--- a/src/tests.py
|
||||
+++ b/src/tests.py
|
||||
@@ -291,7 +291,6 @@ class SystemRandom_TestBasicOps(TestBasicOps):
|
||||
# Verify argument checking
|
||||
self.assertRaises(TypeError, self.gen.getrandbits)
|
||||
self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
|
||||
- self.assertRaises(ValueError, self.gen.getrandbits, 0)
|
||||
self.assertRaises(ValueError, self.gen.getrandbits, -1)
|
||||
self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
|
||||
|
||||
@@ -448,7 +447,6 @@ class MersenneTwister_TestBasicOps(TestBasicOps):
|
||||
self.assertRaises(TypeError, self.gen.getrandbits)
|
||||
self.assertRaises(TypeError, self.gen.getrandbits, 'a')
|
||||
self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
|
||||
- self.assertRaises(ValueError, self.gen.getrandbits, 0)
|
||||
self.assertRaises(ValueError, self.gen.getrandbits, -1)
|
||||
|
||||
def test_randbelow_logic(self, _log=log, int=int):
|
||||
--
|
||||
2.29.1
|
||||
|
||||
@@ -3,15 +3,20 @@
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
PYTHON_COMPAT=( python3_{6,7,8,9} )
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python-2.7 random module ported to python-3"
|
||||
HOMEPAGE="https://pypi.org/project/random2/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm64 x86"
|
||||
|
||||
BDEPEND="app-arch/unzip
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
|
||||
distutils_enable_tests setup.py
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-py39-tests.patch" )
|
||||
|
||||
Reference in New Issue
Block a user