MCPcopy
hub / github.com/apache/airflow / skip_if_wrong_backend

Function skip_if_wrong_backend

tests/conftest.py:327–342  ·  view source on GitHub ↗
(marker, item)

Source from the content-addressed store, hash-verified

325
326
327def skip_if_wrong_backend(marker, item):
328 valid_backend_names = marker.args
329 environment_variable_name = "BACKEND"
330 environment_variable_value = os.environ.get(environment_variable_name)
331 if not environment_variable_value or environment_variable_value not in valid_backend_names:
332 pytest.skip(
333 "The test requires one of {valid_backend_names} backend started and "
334 "{name} environment variable to be set to 'true' (it is '{value}')."
335 " It can be set by specifying backend at breeze startup"
336 ": {item}".format(
337 name=environment_variable_name,
338 value=environment_variable_value,
339 valid_backend_names=valid_backend_names,
340 item=item,
341 )
342 )
343
344
345def skip_if_credential_file_missing(item):

Callers 1

pytest_runtest_setupFunction · 0.85

Calls 3

skipMethod · 0.80
getMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected