Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ HookBase class

.. method:: __enter__()

Called immediately before runnig benchmark code.
Called immediately before running benchmark code.

May be called multiple times per instance.

Expand Down
6 changes: 3 additions & 3 deletions pyperf/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def mock_open(filename, *args, **kw):
elif filename == '/sys/devices/system/cpu/cpuidle/current_driver':
data = 'IDLE_DRV\n'
else:
raise ValueError("unexpect open: %r" % filename)
raise ValueError("unexpected open: %r" % filename)
return io.StringIO(data)

with mock.patch('pyperf._collect_metadata.get_isolated_cpus', return_value=[2]):
Expand Down Expand Up @@ -196,7 +196,7 @@ def mock_open(filename, *args, **kw):
elif filename.startswith('/sys/devices/system/cpu/cpu2'):
raise OSError
else:
raise ValueError("unexpect open: %r" % filename)
raise ValueError("unexpected open: %r" % filename)
return io.StringIO(data)

with mock.patch('pyperf._utils.open', create=True, side_effect=mock_open):
Expand All @@ -214,7 +214,7 @@ def mock_open(filename, *args, **kw):
if filename == '/proc/cpuinfo':
data = self.POWER8_CPUINFO
else:
raise ValueError("unexpect open: %r" % filename)
raise ValueError("unexpected open: %r" % filename)
return io.StringIO(data)

with mock.patch('pyperf._utils.open', create=True, side_effect=mock_open):
Expand Down
Loading