summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-08 22:44:44 (GMT)
committerGitHub <noreply@github.com>2017-11-08 22:44:44 (GMT)
commit8c663fd60ecba9c82aa4c404dbfb1aae69fe8553 (patch)
tree8aed07de4d990bd998a61a051f3ac6b1a88f6392 /Lib/test/test_tarfile.py
parent0e163d2ced28ade8ff526e8c663faf03c2c0b168 (diff)
downloadcpython-8c663fd60ecba9c82aa4c404dbfb1aae69fe8553.zip
cpython-8c663fd60ecba9c82aa4c404dbfb1aae69fe8553.tar.gz
cpython-8c663fd60ecba9c82aa4c404dbfb1aae69fe8553.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 030ace1..f0a5b21 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -779,12 +779,12 @@ class Bz2DetectReadTest(Bz2Test, DetectReadTest):
def test_detect_stream_bz2(self):
# Originally, tarfile's stream detection looked for the string
# "BZh91" at the start of the file. This is incorrect because
- # the '9' represents the blocksize (900kB). If the file was
+ # the '9' represents the blocksize (900,000 bytes). If the file was
# compressed using another blocksize autodetection fails.
with open(tarname, "rb") as fobj:
data = fobj.read()
- # Compress with blocksize 100kB, the file starts with "BZh11".
+ # Compress with blocksize 100,000 bytes, the file starts with "BZh11".
with bz2.BZ2File(tmpname, "wb", compresslevel=1) as fobj:
fobj.write(data)