Skip to content

Commit

Permalink
Replace exception in runner construction with a skip message.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 29, 2024
1 parent a3606f8 commit d16fd99
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pytest_perf/plugin.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import contextlib
import functools
import importlib
import re
import inspect
import re
import textwrap
import contextlib
import warnings

import pytest
from typing import List
Expand Down Expand Up @@ -145,7 +146,11 @@ def __init__(self, name, parent, spec):
Experiment._instances.append(self)

def runtest(self):
self.results = self.runner.run(self.command)
try:
runner = self.runner
except Exception:
pytest.skip("Unable to construct runner")
self.results = runner.run(self.command)

@property
def config_params(self):
Expand Down

0 comments on commit d16fd99

Please sign in to comment.