unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 4f6c56027ac2d8cbfd02259fd47a268a48ec3296 918 bytes (raw)
name: packages/patches/python-random2-getrandbits-test.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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):

debug log:

solving 4f6c56027ac2d8cbfd02259fd47a268a48ec3296 ...
found 4f6c56027ac2d8cbfd02259fd47a268a48ec3296 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).