Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.6:Update
python-random2.30661
python3.9.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python3.9.patch of Package python-random2.30661
Description: fix tests with python 3.9 Python docs for the function being tested now state: "Changed in version 3.9: This method now accepts zero for k." https://docs.python.org/3/library/random.html#random.getrandbits Author: Juhani Numminen <juhaninumminen0@gmail.com> Bug-Debian: https://bugs.debian.org/973085 Last-Update: 2020-11-24 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/tests.py +++ b/src/tests.py @@ -291,7 +291,8 @@ # Verify argument checking self.assertRaises(TypeError, self.gen.getrandbits) 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) self.assertRaises(TypeError, self.gen.getrandbits, 10.1) @@ -448,7 +449,8 @@ 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):
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor