Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Add a test
  • Loading branch information
mdboom committed Oct 15, 2024
commit bdbaef505b4408832687b1179822d2b8b3180c6d
19 changes: 19 additions & 0 deletions pyperformance/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,25 @@ def test_run_test_benchmarks(self):
capture=None,
)

def test_run_with_hook(self):
# We expect this to fail, since pystats requires a special build of Python
filename = self.resolve_tmp('bench-test-hook.json')

stdout = self.run_pyperformance(
'run',
'--manifest', os.path.join(tests.DATA_DIR, 'MANIFEST'),
'-b', 'all',
'-o', filename,
'--hook', 'pystats',
exitcode=1,
capture='combined'
)

self.assertIn(
"Can not collect pystats because python was not built with --enable-pystats",
stdout
)

###################################
# compile

Expand Down