@@ -395,16 +395,20 @@ def test_get_most_impactful_change(changes, expected):
395395
396396
397397@pytest .mark .parametrize (
398- "changed_files, expected" ,
398+ "provider_id, changed_files, expected" ,
399399 [
400- pytest .param (["providers/slack/docs/slack.rst" ], "documentation" , id = "only_docs" ),
401- pytest .param (["providers/slack/tests/test_slack.py" ], "test_or_example_only" , id = "only_tests" ),
400+ pytest .param ("slack" , ["providers/slack/docs/slack.rst" ], "documentation" , id = "only_docs" ),
402401 pytest .param (
402+ "slack" , ["providers/slack/tests/test_slack.py" ], "test_or_example_only" , id = "only_tests"
403+ ),
404+ pytest .param (
405+ "slack" ,
403406 ["providers/slack/src/airflow/providers/slack/example_dags/example_notify.py" ],
404407 "test_or_example_only" ,
405408 id = "only_example_dags" ,
406409 ),
407410 pytest .param (
411+ "slack" ,
408412 [
409413 "providers/slack/tests/test_slack.py" ,
410414 "providers/slack/src/airflow/providers/slack/example_dags/example_notify.py" ,
@@ -413,6 +417,7 @@ def test_get_most_impactful_change(changes, expected):
413417 id = "tests_and_example_dags" ,
414418 ),
415419 pytest .param (
420+ "slack" ,
416421 [
417422 "providers/slack/tests/test_slack.py" ,
418423 "providers/slack/docs/slack.rst" ,
@@ -421,6 +426,7 @@ def test_get_most_impactful_change(changes, expected):
421426 id = "docs_and_tests" ,
422427 ),
423428 pytest .param (
429+ "slack" ,
424430 [
425431 "providers/slack/src/airflow/providers/slack/hooks/slack.py" ,
426432 "providers/slack/docs/slack.rst" ,
@@ -429,17 +435,36 @@ def test_get_most_impactful_change(changes, expected):
429435 id = "docs_and_real_code" ,
430436 ),
431437 pytest .param (
438+ "slack" ,
432439 [
433440 "providers/slack/src/airflow/providers/slack/hooks/slack.py" ,
434441 "providers/slack/tests/test_slack.py" ,
435442 ],
436443 "other" ,
437444 id = "real_code_and_tests" ,
438445 ),
439- pytest .param (["airflow/utils/db.py" ], "other" , id = "non_provider_file" ),
440- pytest .param ([], "other" , id = "empty_commit" ),
446+ pytest .param (
447+ "google" ,
448+ [
449+ "providers/google/tests/some_test.py" ,
450+ "providers/amazon/tests/test_something.py" ,
451+ ],
452+ "test_or_example_only" ,
453+ id = "tests_in_multiple_providers" ,
454+ ),
455+ pytest .param (
456+ "amazon" ,
457+ [
458+ "providers/google/tests/some_test.py" ,
459+ "providers/amazon/tests/test_something.py" ,
460+ ],
461+ "test_or_example_only" ,
462+ id = "tests_in_multiple_providers" ,
463+ ),
464+ pytest .param ("slack" , ["airflow/utils/db.py" ], "other" , id = "non_provider_file" ),
465+ pytest .param ("slack" , [], "other" , id = "empty_commit" ),
441466 ],
442467)
443- def test_classify_provider_pr_files_logic (changed_files , expected ):
444- result = classification_result (changed_files )
468+ def test_classify_provider_pr_files_logic (provider_id , changed_files , expected ):
469+ result = classification_result (provider_id , changed_files )
445470 assert result == expected
0 commit comments