Skip to content

Commit 206dba0

Browse files
committed
SNOW-2306184: config refactor - after rebase fixes
1 parent 619a286 commit 206dba0

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

src/snowflake/cli/api/cli_global_context.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
from snowflake.cli.api.output.formats import OutputFormat
2929
from snowflake.cli.api.rendering.jinja import CONTEXT_KEY
3030
from snowflake.connector import SnowflakeConnection
31+
from snowflake.connector.config_manager import (
32+
ConfigManager,
33+
ConfigSlice,
34+
ConfigSliceOptions,
35+
)
3136
from snowflake.connector.constants import CONFIG_FILE
3237

3338
if TYPE_CHECKING:
3439
from snowflake.cli._plugins.sql.repl import Repl
3540
from snowflake.cli.api.project.definition_manager import DefinitionManager
3641
from snowflake.cli.api.project.schemas.project_definition import ProjectDefinition
37-
from snowflake.connector.config_manager import (
38-
ConfigManager,
39-
ConfigSlice,
40-
ConfigSliceOptions,
41-
)
4242

4343
_CONNECTION_CACHE = OpenConnectionCache()
4444

tests/output/test_format_silent_enforcement.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def test_table_result_with_silent_enabled(runner):
2727
| string | 42 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
2828
| string | 43 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
2929
+---------------------------------------------------------------------+
30+
3031
"""
3132
)
3233

@@ -47,6 +48,7 @@ def test_table_result_with_silent_disabled(runner):
4748
| string | 42 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
4849
| string | 43 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
4950
+---------------------------------------------------------------------+
51+
5052
"""
5153
)
5254

tests/output/test_printing.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def test_single_collection_result(capsys, mock_cursor):
115115
| ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
116116
| ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
117117
+---------------------------------------------------+
118+
118119
"""
119120
)
120121

@@ -146,6 +147,7 @@ def test_print_markup_tags_in_output_do_not_raise_errors(capsys, mock_cursor):
146147
|------------------------------------------------|
147148
| [INST]footranscript[/INST] |
148149
+------------------------------------------------+
150+
149151
"""
150152
)
151153

@@ -161,12 +163,14 @@ def test_print_multi_results_table(capsys, _multiple_results):
161163
| string | 42 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
162164
| string | 43 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
163165
+---------------------------------------------------------------------+
166+
164167
+---------------------------------------------------------------------+
165168
| string | number | array | object | date |
166169
|--------+--------+-----------+-----------------+---------------------|
167170
| string | 42 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
168171
| string | 43 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
169172
+---------------------------------------------------------------------+
173+
170174
"""
171175
)
172176

@@ -199,12 +203,14 @@ def test_print_different_multi_results_table(capsys, _multiple_different_results
199203
| string | 42 |
200204
| string | 43 |
201205
+-----------------+
206+
202207
+---------------------------------------------------+
203208
| array | object | date |
204209
|-----------+-----------------+---------------------|
205210
| ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
206211
| ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
207212
+---------------------------------------------------+
213+
208214
"""
209215
)
210216

@@ -237,13 +243,15 @@ def test_print_different_data_sources_table(capsys, _multiple_data_sources):
237243
| string | 42 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
238244
| string | 43 | ['array'] | {'k': 'object'} | 2022-03-21 00:00:00 |
239245
+---------------------------------------------------------------------+
246+
240247
Command done
241248
+---------+
242249
| key |
243250
|---------|
244251
| value_0 |
245252
| value_1 |
246253
+---------+
254+
247255
"""
248256
)
249257

@@ -401,6 +409,7 @@ def test_print_bytearray(capsys, _bytearray_result):
401409
|----------------------------------|
402410
| 544849532053484f554c4420574f524b |
403411
+----------------------------------+
412+
404413
"""
405414
)
406415

0 commit comments

Comments
 (0)