File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
airbyte_cdk/test/standard_tests Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 66import inspect
77import shutil
88import sys
9+ import warnings
910from pathlib import Path
1011
1112import pytest
@@ -57,11 +58,23 @@ def get_scenarios(
5758 parametrization of fixtures with arguments from the test class itself.
5859 """
5960 categories = ["connection" , "spec" ]
60- all_tests_config = yaml .safe_load (cls .acceptance_test_config_path .read_text ())
61+ try :
62+ acceptance_test_config_path = cls .acceptance_test_config_path
63+ except FileNotFoundError as e :
64+ # Destinations sometimes do not have an acceptance tests file.
65+ warnings .warn (
66+ f"Acceptance test config file not found: { e !s} . "
67+ "No scenarios will be loaded." ,
68+ category = UserWarning ,
69+ stacklevel = 0 ,
70+ )
71+ return []
72+
73+ all_tests_config = yaml .safe_load (acceptance_test_config_path .read_text ())
6174 if "acceptance_tests" not in all_tests_config :
6275 raise ValueError (
63- f"Acceptance tests config not found in { cls . acceptance_test_config_path } ."
64- f" Found only: { str ( all_tests_config ) } ."
76+ f"Acceptance tests config not found in { acceptance_test_config_path } . "
77+ f"Found only: { all_tests_config !s } ."
6578 )
6679
6780 test_scenarios : list [ConnectorTestScenario ] = []
You can’t perform that action at this time.
0 commit comments