mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Replace KB unit with KiB (#4293)
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB.
This commit is contained in:
parent
0e163d2ced
commit
8c663fd60e
38 changed files with 76 additions and 76 deletions
|
@ -72,7 +72,7 @@ class ChecksumTestCase(unittest.TestCase):
|
|||
self.assertEqual(binascii.crc32(b'spam'), zlib.crc32(b'spam'))
|
||||
|
||||
|
||||
# Issue #10276 - check that inputs >=4GB are handled correctly.
|
||||
# Issue #10276 - check that inputs >=4 GiB are handled correctly.
|
||||
class ChecksumBigBufferTestCase(unittest.TestCase):
|
||||
|
||||
@bigmemtest(size=_4G + 4, memuse=1, dry_run=False)
|
||||
|
@ -130,7 +130,7 @@ class ExceptionTestCase(unittest.TestCase):
|
|||
class BaseCompressTestCase(object):
|
||||
def check_big_compress_buffer(self, size, compress_func):
|
||||
_1M = 1024 * 1024
|
||||
# Generate 10MB worth of random, and expand it by repeating it.
|
||||
# Generate 10 MiB worth of random, and expand it by repeating it.
|
||||
# The assumption is that zlib's memory is not big enough to exploit
|
||||
# such spread out redundancy.
|
||||
data = b''.join([random.getrandbits(8 * _1M).to_bytes(_1M, 'little')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue