Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/system/small/test_pandas_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_read_gbq_start_sets_session_location(
# Now read_gbq* from another location should fail
with pytest.raises(
google.api_core.exceptions.NotFound,
match=f"404 Not found: Dataset {dataset_id_permanent} was not found in location {tokyo_location}",
match=dataset_id_permanent,
):
read_method(query)

Expand All @@ -100,7 +100,7 @@ def test_read_gbq_start_sets_session_location(
# Now read_gbq* from another location should fail
with pytest.raises(
google.api_core.exceptions.NotFound,
match=f"404 Not found: Dataset {dataset_id_permanent_tokyo} was not found in location US",
match=dataset_id_permanent_tokyo,
):
read_method(query_tokyo)

Expand Down Expand Up @@ -146,7 +146,7 @@ def test_read_gbq_after_session_start_must_comply_with_default_location(
# Doing read_gbq* from a table in another location should fail
with pytest.raises(
google.api_core.exceptions.NotFound,
match=f"404 Not found: Dataset {dataset_id_permanent_tokyo} was not found in location US",
match=dataset_id_permanent_tokyo,
):
read_method(query_tokyo)

Expand Down Expand Up @@ -194,7 +194,7 @@ def test_read_gbq_must_comply_with_set_location_US(
# Starting user journey with read_gbq* from another location should fail
with pytest.raises(
google.api_core.exceptions.NotFound,
match=f"404 Not found: Dataset {dataset_id_permanent_tokyo} was not found in location US",
match=dataset_id_permanent_tokyo,
):
read_method(query_tokyo)

Expand Down Expand Up @@ -244,7 +244,7 @@ def test_read_gbq_must_comply_with_set_location_non_US(
# Starting user journey with read_gbq* from another location should fail
with pytest.raises(
google.api_core.exceptions.NotFound,
match=f"404 Not found: Dataset {dataset_id_permanent} was not found in location {tokyo_location}",
match=dataset_id_permanent,
):
read_method(query)

Expand Down
7 changes: 3 additions & 4 deletions tests/system/small/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,10 @@ def test_read_pandas_multi_index(session, scalars_pandas_df_multi_index):


def test_read_pandas_rowid_exists_adds_suffix(session, scalars_pandas_df_default_index):
scalars_pandas_df_default_index["rowid"] = np.arange(
scalars_pandas_df_default_index.shape[0]
)
pandas_df = scalars_pandas_df_default_index.copy()
pandas_df["rowid"] = np.arange(pandas_df.shape[0])

df = session.read_pandas(scalars_pandas_df_default_index)
df = session.read_pandas(pandas_df)
total_order_col = df._block._expr._ordering.total_order_col
assert total_order_col and total_order_col.column_id == "rowid_2"

Expand Down