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 6
6
import inspect
7
7
import shutil
8
8
import sys
9
+ import warnings
9
10
from pathlib import Path
10
11
11
12
import pytest
@@ -57,11 +58,23 @@ def get_scenarios(
57
58
parametrization of fixtures with arguments from the test class itself.
58
59
"""
59
60
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 ())
61
74
if "acceptance_tests" not in all_tests_config :
62
75
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 } ."
65
78
)
66
79
67
80
test_scenarios : list [ConnectorTestScenario ] = []
You can’t perform that action at this time.
0 commit comments