Skip to content

Commit

Permalink
Fix typo: kiB -> KiB
Browse files Browse the repository at this point in the history
  • Loading branch information
yngvem committed Aug 10, 2024
1 parent 35506d3 commit 1957cfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyperf/_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def format_filesize(size):
if size > 10 * 1024 * 1024:
return '%.1f MiB' % (size / (1024.0 * 1024.0))

return '%.1f kiB' % (size / 1024.0)
return '%.1f KiB' % (size / 1024.0)


def format_filesizes(sizes):
Expand Down
8 changes: 4 additions & 4 deletions pyperf/tests/test_perf_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,13 @@ def test_dump(self):
def test_dump_track_memory(self):
expected = """
Run 1: calibrate the number of loops: 2^15
- calibrate 1: 7188.0 kiB (loops: 2^15)
- calibrate 1: 7188.0 KiB (loops: 2^15)
Run 2: 0 warmups, 1 value, 2^15 loops
- value 1: 7188.0 kiB
- value 1: 7188.0 KiB
Run 3: 0 warmups, 1 value, 2^15 loops
- value 1: 7192.0 kiB
- value 1: 7192.0 KiB
Run 4: 0 warmups, 1 value, 2^15 loops
- value 1: 7208.0 kiB
- value 1: 7208.0 KiB
"""
filename = os.path.join(TESTDIR, 'track_memory.json')
stdout = self.run_command('dump', filename)
Expand Down
2 changes: 1 addition & 1 deletion pyperf/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def test_format_filesize(self):
self.assertEqual(format_filesize(1),
'1 byte')
self.assertEqual(format_filesize(10 * 1024),
'10.0 kiB')
'10.0 KiB')
self.assertEqual(format_filesize(12.4 * 1024 * 1024),
'12.4 MiB')

Expand Down

0 comments on commit 1957cfb

Please sign in to comment.