-
Notifications
You must be signed in to change notification settings - Fork 234
/
test_utils.py
143 lines (93 loc) · 3.77 KB
/
test_utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import pytest
from dbt.tests.adapter.utils.test_array_append import BaseArrayAppend
from dbt.tests.adapter.utils.test_array_concat import BaseArrayConcat
from dbt.tests.adapter.utils.test_array_construct import BaseArrayConstruct
from dbt.tests.adapter.utils.test_any_value import BaseAnyValue
from dbt.tests.adapter.utils.test_bool_or import BaseBoolOr
from dbt.tests.adapter.utils.test_cast_bool_to_text import BaseCastBoolToText
from dbt.tests.adapter.utils.test_concat import BaseConcat
from dbt.tests.adapter.utils.test_current_timestamp import BaseCurrentTimestampNaive
from dbt.tests.adapter.utils.test_dateadd import BaseDateAdd
from dbt.tests.adapter.utils.test_datediff import BaseDateDiff
from dbt.tests.adapter.utils.test_date_trunc import BaseDateTrunc
from dbt.tests.adapter.utils.test_escape_single_quotes import BaseEscapeSingleQuotesQuote
from dbt.tests.adapter.utils.test_escape_single_quotes import BaseEscapeSingleQuotesBackslash
from dbt.tests.adapter.utils.test_except import BaseExcept
from dbt.tests.adapter.utils.test_hash import BaseHash
from dbt.tests.adapter.utils.test_intersect import BaseIntersect
from dbt.tests.adapter.utils.test_last_day import BaseLastDay
from dbt.tests.adapter.utils.test_length import BaseLength
from dbt.tests.adapter.utils.test_position import BasePosition
from dbt.tests.adapter.utils.test_replace import BaseReplace
from dbt.tests.adapter.utils.test_right import BaseRight
from dbt.tests.adapter.utils.test_safe_cast import BaseSafeCast
from dbt.tests.adapter.utils.test_split_part import BaseSplitPart
from dbt.tests.adapter.utils.test_string_literal import BaseStringLiteral
# requires modification
from dbt.tests.adapter.utils.test_listagg import BaseListagg
from dbt.tests.adapter.utils.fixture_listagg import models__test_listagg_yml
from tests.functional.adapter.utils.fixture_listagg import models__test_listagg_no_order_by_sql
class TestAnyValue(BaseAnyValue):
pass
class TestArrayAppend(BaseArrayAppend):
pass
class TestArrayConcat(BaseArrayConcat):
pass
class TestArrayConstruct(BaseArrayConstruct):
pass
class TestBoolOr(BaseBoolOr):
pass
class TestCastBoolToText(BaseCastBoolToText):
pass
@pytest.mark.skip_profile('spark_session')
class TestConcat(BaseConcat):
pass
# Use either BaseCurrentTimestampAware or BaseCurrentTimestampNaive but not both
class TestCurrentTimestamp(BaseCurrentTimestampNaive):
pass
class TestDateAdd(BaseDateAdd):
pass
# this generates too much SQL to run successfully in our testing environments :(
@pytest.mark.skip_profile('apache_spark', 'spark_session')
class TestDateDiff(BaseDateDiff):
pass
class TestDateTrunc(BaseDateTrunc):
pass
class TestEscapeSingleQuotes(BaseEscapeSingleQuotesQuote):
pass
class TestExcept(BaseExcept):
pass
@pytest.mark.skip_profile('spark_session')
class TestHash(BaseHash):
pass
class TestIntersect(BaseIntersect):
pass
class TestLastDay(BaseLastDay):
pass
class TestLength(BaseLength):
pass
# SparkSQL does not support 'order by' for its 'listagg' equivalent
# the argument is ignored, so let's ignore those fields when checking equivalency
class TestListagg(BaseListagg):
@pytest.fixture(scope="class")
def models(self):
return {
"test_listagg.yml": models__test_listagg_yml,
"test_listagg.sql": self.interpolate_macro_namespace(
models__test_listagg_no_order_by_sql, "listagg"
),
}
class TestPosition(BasePosition):
pass
@pytest.mark.skip_profile('spark_session')
class TestReplace(BaseReplace):
pass
@pytest.mark.skip_profile('spark_session')
class TestRight(BaseRight):
pass
class TestSafeCast(BaseSafeCast):
pass
class TestSplitPart(BaseSplitPart):
pass
class TestStringLiteral(BaseStringLiteral):
pass