4
4
seeds__data_datediff_csv ,
5
5
models__test_datediff_yml ,
6
6
)
7
+ from dbt .tests .adapter .utils .fixture_dateadd import (
8
+ seeds__data_dateadd_csv ,
9
+ models__test_dateadd_yml ,
10
+ )
7
11
from dbt .tests .adapter .utils .test_any_value import BaseAnyValue
8
12
from dbt .tests .adapter .utils .test_array_append import BaseArrayAppend
9
13
from dbt .tests .adapter .utils .test_array_concat import BaseArrayConcat
29
33
from dbt .tests .adapter .utils .test_safe_cast import BaseSafeCast
30
34
from dbt .tests .adapter .utils .test_split_part import BaseSplitPart
31
35
from 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
32
39
33
40
34
41
class TestAnyValue (BaseAnyValue ):
@@ -66,6 +73,32 @@ class TestConcat(BaseConcat):
66
73
class TestCurrentTimestampNaive (BaseCurrentTimestampNaive ):
67
74
pass
68
75
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
+
69
102
70
103
class TestDateAdd (BaseDateAdd ):
71
104
pass
@@ -179,10 +212,21 @@ class TestRight(BaseRight):
179
212
class TestSafeCast (BaseSafeCast ):
180
213
pass
181
214
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" )
183
216
class TestSplitPart (BaseSplitPart ):
184
217
pass
185
218
186
-
187
219
class TestStringLiteral (BaseStringLiteral ):
188
220
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