summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-random2-getrandbits-test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/python-random2-getrandbits-test.patch')
-rw-r--r--gnu/packages/patches/python-random2-getrandbits-test.patch23
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 00000000000..4f6c56027ac
--- /dev/null
+++ b/gnu/packages/patches/python-random2-getrandbits-test.patch
@@ -0,0 +1,23 @@
1From 1bac6355d9c65de847cc445d782c466778b94fbd Mon Sep 17 00:00:00 2001
2From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
3Date: Sun, 9 May 2021 11:18:23 -0400
4Subject: [PATCH] Update tests for python3.9
5
6---
7 src/tests.py | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
9
10diff --git a/src/tests.py b/src/tests.py
11index d918891..4f2c3de 100644
12--- a/src/tests.py
13+++ b/src/tests.py
14@@ -448,7 +448,8 @@ def test_genrandbits(self):
15 self.assertRaises(TypeError, self.gen.getrandbits)
16 self.assertRaises(TypeError, self.gen.getrandbits, 'a')
17 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
18- self.assertRaises(ValueError, self.gen.getrandbits, 0)
19+ if sys.version_info < (3, 9):
20+ self.assertRaises(ValueError, self.gen.getrandbits, 0)
21 self.assertRaises(ValueError, self.gen.getrandbits, -1)
22
23 def test_randbelow_logic(self, _log=log, int=int):