diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2021-09-11 14:16:46 +0200 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2021-09-11 14:16:46 +0200 |
commit | 9cfa0078e6c08d182e09efe4f216ed9b528ec3ad (patch) | |
tree | 7fd62fe500b2275c98b0ae60d3b710a7948db393 /gnu/packages/patches/python-random2-getrandbits-test.patch | |
parent | 0321c098d3d57ae4f046a131a5e9610e3495f843 (diff) |
gnu: python-random2: Fix building with python 3.9.
* gnu/packages/patches/python-random2-getrandbits-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-xyz.scm (python-random2)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches/python-random2-getrandbits-test.patch')
-rw-r--r-- | gnu/packages/patches/python-random2-getrandbits-test.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-random2-getrandbits-test.patch b/gnu/packages/patches/python-random2-getrandbits-test.patch new file mode 100644 index 0000000000..4f6c56027a --- /dev/null +++ b/gnu/packages/patches/python-random2-getrandbits-test.patch @@ -0,0 +1,23 @@ +From 1bac6355d9c65de847cc445d782c466778b94fbd Mon Sep 17 00:00:00 2001 +From: "Robert T. McGibbon" <rmcgibbo@gmail.com> +Date: Sun, 9 May 2021 11:18:23 -0400 +Subject: [PATCH] Update tests for python3.9 + +--- + src/tests.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/tests.py b/src/tests.py +index d918891..4f2c3de 100644 +--- a/src/tests.py ++++ b/src/tests.py +@@ -448,7 +448,8 @@ def test_genrandbits(self): + 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) ++ if sys.version_info < (3, 9): ++ self.assertRaises(ValueError, self.gen.getrandbits, 0) + self.assertRaises(ValueError, self.gen.getrandbits, -1) + + def test_randbelow_logic(self, _log=log, int=int): |