mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-30 20:34:40 +01:00
change docstring
This commit is contained in:
parent
8ea52ec344
commit
f964b72450
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ def handler(request):
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def skip_handler(request, handler):
|
def skip_handler(request, handler):
|
||||||
# usage: pytest.mark.skip_handler('my_handler', 'reason')
|
"""usage: pytest.mark.skip_handler('my_handler', 'reason')"""
|
||||||
for marker in request.node.iter_markers('skip_handler'):
|
for marker in request.node.iter_markers('skip_handler'):
|
||||||
if marker.args[0] == handler.RH_KEY:
|
if marker.args[0] == handler.RH_KEY:
|
||||||
pytest.skip(marker.args[1] if len(marker.args) > 1 else '')
|
pytest.skip(marker.args[1] if len(marker.args) > 1 else '')
|
||||||
|
@ -38,7 +38,7 @@ def skip_handler(request, handler):
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def skip_handler_if(request, handler):
|
def skip_handler_if(request, handler):
|
||||||
# usage: pytest.mark.skip_handler_if('my_handler', lambda request: True, 'reason')
|
"""usage: pytest.mark.skip_handler_if('my_handler', lambda request: True, 'reason')"""
|
||||||
for marker in request.node.iter_markers('skip_handler_if'):
|
for marker in request.node.iter_markers('skip_handler_if'):
|
||||||
if marker.args[0] == handler.RH_KEY and marker.args[1](request):
|
if marker.args[0] == handler.RH_KEY and marker.args[1](request):
|
||||||
pytest.skip(marker.args[2] if len(marker.args) > 2 else '')
|
pytest.skip(marker.args[2] if len(marker.args) > 2 else '')
|
||||||
|
@ -46,7 +46,7 @@ def skip_handler_if(request, handler):
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def skip_handlers_if(request, handler):
|
def skip_handlers_if(request, handler):
|
||||||
# usage: pytest.mark.skip_handlers_if(lambda request, handler: True, 'reason')
|
"""usage: pytest.mark.skip_handlers_if(lambda request, handler: True, 'reason')"""
|
||||||
for marker in request.node.iter_markers('skip_handlers_if'):
|
for marker in request.node.iter_markers('skip_handlers_if'):
|
||||||
if handler and marker.args[0](request, handler):
|
if handler and marker.args[0](request, handler):
|
||||||
pytest.skip(marker.args[1] if len(marker.args) > 1 else '')
|
pytest.skip(marker.args[1] if len(marker.args) > 1 else '')
|
||||||
|
|
Loading…
Add table
Reference in a new issue