diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-17 20:54:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 20:54:38 (GMT) |
commit | 87502ddd710eb1f030b8ff5a60b05becea3f474f (patch) | |
tree | 695a6abbaa45adf48766011f144050ce9b6b3780 /Lib/test/test_lzma.py | |
parent | 223221b290db00ca1042c77103efcbc072f29c90 (diff) | |
download | cpython-87502ddd710eb1f030b8ff5a60b05becea3f474f.zip cpython-87502ddd710eb1f030b8ff5a60b05becea3f474f.tar.gz cpython-87502ddd710eb1f030b8ff5a60b05becea3f474f.tar.bz2 |
bpo-40286: Use random.randbytes() in tests (GH-19575)
Diffstat (limited to 'Lib/test/test_lzma.py')
-rw-r--r-- | Lib/test/test_lzma.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py index f24ed3c..0f3af27 100644 --- a/Lib/test/test_lzma.py +++ b/Lib/test/test_lzma.py @@ -350,7 +350,7 @@ class CompressorDecompressorTestCase(unittest.TestCase): def test_decompressor_bigmem(self, size): lzd = LZMADecompressor() blocksize = 10 * 1024 * 1024 - block = random.getrandbits(blocksize * 8).to_bytes(blocksize, "little") + block = random.randbytes(blocksize) try: input = block * (size // blocksize + 1) cdata = lzma.compress(input) |