@@ -514,6 +514,7 @@ def remove_implicit_resolver(cls, tag_to_remove):
514514 branch_candidates .append ("main" )
515515
516516 response = None
517+ branch = "main"
517518 for branch in branch_candidates :
518519 yaml_tests_url = f"https://api.github.com/repos/elastic/elasticsearch-clients-tests/zipball/{ branch } "
519520 response = http .request ("GET" , yaml_tests_url )
@@ -567,7 +568,7 @@ def remove_implicit_resolver(cls, tag_to_remove):
567568 for prefix in ("rest-api-spec/" , "test/" , "free/" , "platinum/" ):
568569 if pytest_test_name .startswith (prefix ):
569570 pytest_test_name = pytest_test_name [len (prefix ) :]
570- pytest_param_id = "[%s]%s [%d]" % (branch , pytest_test_name , test_number )
571+ pytest_param_id = "%s [%d]" % (pytest_test_name , test_number )
571572
572573 pytest_param = {
573574 "setup" : setup_steps ,
@@ -580,7 +581,9 @@ def remove_implicit_resolver(cls, tag_to_remove):
580581 elif pytest_test_name in SKIPPED_TESTS or pytest_param_id in SKIPPED_TESTS :
581582 pytest_param ["skip" ] = True
582583
583- YAML_TEST_SPECS .append (pytest .param (pytest_param , id = pytest_param_id ))
584+ YAML_TEST_SPECS .append (
585+ pytest .param (pytest_param , id = f"[{ branch } ]{ pytest_param_id } " )
586+ )
584587
585588except Exception as e :
586589 warnings .warn (f"Could not load REST API tests: { str (e )} " )
0 commit comments