summaryrefslogtreecommitdiff
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-08 14:44:44 -0800
committerGitHub <noreply@github.com>2017-11-08 14:44:44 -0800
commit8c663fd60ecba9c82aa4c404dbfb1aae69fe8553 (patch)
tree8aed07de4d990bd998a61a051f3ac6b1a88f6392 /Lib/test/test_io.py
parent0e163d2ced28ade8ff526e8c663faf03c2c0b168 (diff)
downloadcpython-git-8c663fd60ecba9c82aa4c404dbfb1aae69fe8553.tar.gz
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_io.py')
-rw-r--r--Lib/test/test_io.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index ce4ed1b8f6..3158729a7f 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -564,7 +564,7 @@ class IOTest(unittest.TestCase):
def test_large_file_ops(self):
# On Windows and Mac OSX this test comsumes large resources; It takes
- # a long time to build the >2GB file and takes >2GB of disk space
+ # a long time to build the >2 GiB file and takes >2 GiB of disk space
# therefore the resource must be enabled to run this test.
if sys.platform[:3] == 'win' or sys.platform == 'darwin':
support.requires(
@@ -736,7 +736,7 @@ class IOTest(unittest.TestCase):
if sys.maxsize > 0x7FFFFFFF:
self.skipTest("test can only run in a 32-bit address space")
if support.real_max_memuse < support._2G:
- self.skipTest("test requires at least 2GB of memory")
+ self.skipTest("test requires at least 2 GiB of memory")
with self.open(zero, "rb", buffering=0) as f:
self.assertRaises(OverflowError, f.read)
with self.open(zero, "rb") as f:
@@ -1421,7 +1421,7 @@ class CBufferedReaderTest(BufferedReaderTest, SizeofTest):
def test_constructor(self):
BufferedReaderTest.test_constructor(self)
# The allocation can succeed on 32-bit builds, e.g. with more
- # than 2GB RAM and a 64-bit kernel.
+ # than 2 GiB RAM and a 64-bit kernel.
if sys.maxsize > 0x7FFFFFFF:
rawio = self.MockRawIO()
bufio = self.tp(rawio)
@@ -1733,7 +1733,7 @@ class CBufferedWriterTest(BufferedWriterTest, SizeofTest):
def test_constructor(self):
BufferedWriterTest.test_constructor(self)
# The allocation can succeed on 32-bit builds, e.g. with more
- # than 2GB RAM and a 64-bit kernel.
+ # than 2 GiB RAM and a 64-bit kernel.
if sys.maxsize > 0x7FFFFFFF:
rawio = self.MockRawIO()
bufio = self.tp(rawio)
@@ -2206,7 +2206,7 @@ class CBufferedRandomTest(BufferedRandomTest, SizeofTest):
def test_constructor(self):
BufferedRandomTest.test_constructor(self)
# The allocation can succeed on 32-bit builds, e.g. with more
- # than 2GB RAM and a 64-bit kernel.
+ # than 2 GiB RAM and a 64-bit kernel.
if sys.maxsize > 0x7FFFFFFF:
rawio = self.MockRawIO()
bufio = self.tp(rawio)