Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
address type error in tests
  • Loading branch information
tswast committed Apr 22, 2024
commit 8c4e31c4eaf6559965dfbc00721c91c3af9dc090
7 changes: 6 additions & 1 deletion tests/system/small/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ def test_read_gbq_w_anonymous_query_results_table(session: bigframes.Session):
def test_read_gbq_w_primary_keys_table(
session: bigframes.Session, usa_names_grouped_table: bigquery.Table
):
# Validate that the table we're querying has a primary key.
table = usa_names_grouped_table
primary_keys = table.table_constraints.primary_key.columns
table_constraints = table.table_constraints
assert table_constraints is not None
primary_key = table_constraints.primary_key
assert primary_key is not None
primary_keys = primary_key.columns
assert len(primary_keys) != 0

df = session.read_gbq(f"{table.project}.{table.dataset_id}.{table.table_id}")
Expand Down