44 seeds__data_datediff_csv ,
55 models__test_datediff_yml ,
66)
7+ from dbt .tests .adapter .utils .fixture_dateadd import (
8+ seeds__data_dateadd_csv ,
9+ models__test_dateadd_yml ,
10+ )
711from dbt .tests .adapter .utils .test_any_value import BaseAnyValue
812from dbt .tests .adapter .utils .test_array_append import BaseArrayAppend
913from dbt .tests .adapter .utils .test_array_concat import BaseArrayConcat
2933from dbt .tests .adapter .utils .test_safe_cast import BaseSafeCast
3034from dbt .tests .adapter .utils .test_split_part import BaseSplitPart
3135from dbt .tests .adapter .utils .test_string_literal import BaseStringLiteral
36+ from dbt .tests .adapter .utils .test_equals import BaseEquals
37+ from dbt .tests .adapter .utils .test_null_compare import BaseMixedNullCompare , BaseNullCompare
38+ from dbt .tests .adapter .utils .test_validate_sql import BaseValidateSqlMethod
3239
3340
3441class TestAnyValue (BaseAnyValue ):
@@ -66,6 +73,32 @@ class TestConcat(BaseConcat):
6673class TestCurrentTimestampNaive (BaseCurrentTimestampNaive ):
6774 pass
6875
76+ class BaseDateAdd (BaseUtils ):
77+
78+ models__test_dateadd_sql = """
79+ with data as (
80+ select * from {{ ref('data_dateadd') }}
81+ )
82+
83+ select
84+ {{ dateadd('datepart', 'interval_length', 'from_time') }} AS actual,
85+ result as expected
86+ from data
87+ """
88+
89+ @pytest .fixture (scope = "class" )
90+ def seeds (self ):
91+ return {"data_dateadd.csv" : seeds__data_dateadd_csv }
92+
93+ @pytest .fixture (scope = "class" )
94+ def models (self ):
95+ return {
96+ "test_dateadd.yml" : models__test_dateadd_yml ,
97+ "test_dateadd.sql" : self .interpolate_macro_namespace (
98+ self .models__test_dateadd_sql , "dateadd"
99+ ),
100+ }
101+
69102
70103class TestDateAdd (BaseDateAdd ):
71104 pass
@@ -179,10 +212,21 @@ class TestRight(BaseRight):
179212class TestSafeCast (BaseSafeCast ):
180213 pass
181214
182-
215+ @ pytest . mark . skip ( "TODO: implement split_part, either using sqlite>=3.8.3 for WITH RECURSIVE support, or possibly sooner using jinja and agate tables" )
183216class TestSplitPart (BaseSplitPart ):
184217 pass
185218
186-
187219class TestStringLiteral (BaseStringLiteral ):
188220 pass
221+
222+ class TestEquals (BaseEquals ):
223+ pass
224+
225+ class TestMixedNullCompare (BaseMixedNullCompare ):
226+ pass
227+
228+ class TestNullCompare (BaseNullCompare ):
229+ pass
230+
231+ class TestValidateSqlMethod (BaseValidateSqlMethod ):
232+ pass
0 commit comments