Skip to content

Commit

Permalink
SNOW-1248609: fix test failure related to timezone in sproc (#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-aling authored Mar 19, 2024
1 parent 7a8121d commit af8fbd7
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tests/integ/scala/test_dataframe_reader_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def test_read_csv_with_special_chars_in_format_type_options(session, mode):
StructField("d", DoubleType()),
StructField("e", StringType()),
StructField("f", BooleanType()),
StructField("g", TimestampType()),
StructField("g", TimestampType(TimestampTimeZone.NTZ)),
StructField("h", TimeType()),
]
)
Expand Down Expand Up @@ -1307,9 +1307,18 @@ def test_filepath_not_exist_or_empty(session):
not_exist_file_path = f"@{tmp_stage_name1}/{not_exist_file}"

with pytest.raises(FileNotFoundError) as ex_info:
session.read.option("PARSE_HEADER", True).option("INFER_SCHEMA", True).csv(empty_file_path)
assert f"Given path: '{empty_file_path}' could not be found or is empty." in str(ex_info)
session.read.option("PARSE_HEADER", True).option("INFER_SCHEMA", True).csv(
empty_file_path
)
assert f"Given path: '{empty_file_path}' could not be found or is empty." in str(
ex_info
)

with pytest.raises(FileNotFoundError) as ex_info:
session.read.option("PARSE_HEADER", True).option("INFER_SCHEMA", True).csv(not_exist_file_path)
assert f"Given path: '{not_exist_file_path}' could not be found or is empty." in str(ex_info)
session.read.option("PARSE_HEADER", True).option("INFER_SCHEMA", True).csv(
not_exist_file_path
)
assert (
f"Given path: '{not_exist_file_path}' could not be found or is empty."
in str(ex_info)
)

0 comments on commit af8fbd7

Please sign in to comment.