File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 22
33# [MISE] description="Make sure the BOM has all necessary modules"
44
5- import os
5+ import difflib
66import re
77import sys
88from fnmatch import fnmatch
99from pathlib import Path
1010from typing import List
11- import difflib
1211
1312ROOT = Path (__file__ ).resolve ().parents [2 ] # repo root (.. from .mise/tasks)
1413IGNORE_DIRS = {"prometheus-metrics-parent" }
Original file line number Diff line number Diff line change 44import tempfile
55import unittest
66
7+ from update_benchmarks import update_pre_blocks_under_module
8+
79# Ensure the tasks directory is importable when running the test directly
810here = os .path .dirname (__file__ )
911if here not in sys .path :
1012 sys .path .insert (0 , here )
1113
12- from update_benchmarks import update_pre_blocks_under_module
13-
14-
1514class TestRunBenchmarksFiltering (unittest .TestCase ):
1615 def setUp (self ):
1716 # sample JMH table with mixed-class lines
Original file line number Diff line number Diff line change @@ -108,15 +108,15 @@ def extract_first_table(jmh_output: str) -> str:
108108 m = re .search (r"(\nBenchmark\s+Mode[\s\S]*?)(?:\n\s*\n|\Z)" , jmh_output )
109109 if not m :
110110 # fallback: collect all lines that contain 'thrpt' plus a header if present
111- lines = [l for l in jmh_output .splitlines () if "thrpt" in l ]
111+ lines = [line for line in jmh_output .splitlines () if "thrpt" in line ]
112112 if not lines :
113113 raise ValueError ('Could not find any "thrpt" lines in JMH output' )
114114 # try to find header
115115 header = next (
116116 (
117- l
118- for l in jmh_output .splitlines ()
119- if l .startswith ("Benchmark" ) and "Mode" in l
117+ line
118+ for line in jmh_output .splitlines ()
119+ if line .startswith ("Benchmark" ) and "Mode" in line
120120 ),
121121 "Benchmark Mode Cnt Score Error Units" ,
122122 )
You can’t perform that action at this time.
0 commit comments