We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imagine the following test:
@retry_endpoint @pytest.mark.parametrize("test", [1, 2]) def test_name_org_deprecation_warning(test): print(test) api = HfApi(endpoint=ENDPOINT_STAGING) token = api.login(username=USER, password=PASS) REPO_NAME = repo_name("crud") args = [ ("create_repo", {}), ("update_repo_visibility", {"private": False}), ("delete_repo", {}), ] getattr(api, method)( name=REPO_NAME, token=token, repo_type=REPO_TYPE_MODEL, **kwargs )
It would fail with:
args = (), kwargs = {}, retry_count = 1 def decorator(*args, **kwargs): retry_count = 1 while retry_count < number_of_tries: try: > return function(*args, **kwargs) E TypeError: test_name_org_deprecation_warning() missing 1 required positional argument: 'test'
Switching the decorators:
@pytest.mark.parametrize("test", [1, 2]) @retry_endpoint def test_name_org_deprecation_warning(test): print(test) api = HfApi(endpoint=ENDPOINT_STAGING) token = api.login(username=USER, password=PASS) REPO_NAME = repo_name("crud") args = [ ("create_repo", {}), ("update_repo_visibility", {"private": False}), ("delete_repo", {}), ] getattr(api, method)( name=REPO_NAME, token=token, repo_type=REPO_TYPE_MODEL, **kwargs )
would result pytest --collect-only to fail with:
pytest --collect-only
In decorator: function uses no argument 'test'
cc @muellerzr who I think has worked on the decorator.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Imagine the following test:
It would fail with:
Switching the decorators:
would result
pytest --collect-only
to fail with:cc @muellerzr who I think has worked on the decorator.
The text was updated successfully, but these errors were encountered: