We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad90c2d commit bf9380cCopy full SHA for bf9380c
codeflash/benchmarking/plugin/plugin.py
@@ -16,12 +16,7 @@
16
if TYPE_CHECKING:
17
from codeflash.models.models import BenchmarkKey
18
19
-try:
20
- import pytest_benchmark
21
-
22
- PYTEST_BENCHMARK_INSTALLED = True
23
-except ImportError:
24
- PYTEST_BENCHMARK_INSTALLED = False
+PYTEST_BENCHMARK_INSTALLED = importlib.util.find_spec("pytest_benchmark") is not None
25
26
27
class CodeFlashBenchmarkPlugin:
@@ -337,5 +332,5 @@ def benchmark(request: pytest.FixtureRequest) -> object:
337
332
**dict(bs.options, **options),
338
333
)
339
334
return lambda func, *args, **kwargs: func(*args, **kwargs)
340
335
+
341
336
0 commit comments