mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add nicer test names for benchmarks
This commit is contained in:
1 parent
21754a0000
commit
de5b085b73
1 file changed
+6
-2
@@ -1,4 +1,5 @@
|
||||
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
|
||||
@@ -19,8 +20,11 @@ benchmarks = [
|
||||
['benchmarks/mandelbrot.py'],
|
||||
]
|
||||
|
||||
@pytest.mark.parametrize('exe', pythons)
|
||||
@pytest.mark.parametrize('args', benchmarks)
|
||||
exe_ids = ['cpython', 'rustpython']
|
||||
benchmark_ids = [benchmark[0].split('/')[-1] for benchmark in benchmarks]
|
||||
|
||||
@pytest.mark.parametrize('exe', pythons, ids=exe_ids)
|
||||
@pytest.mark.parametrize('args', benchmarks, ids=benchmark_ids)
|
||||
def test_bench(exe, args, benchmark):
|
||||
def bench():
|
||||
subprocess.run([exe] + args)
|
||||
|
||||
Reference in new issue
Block a user