Skip to content

Commit

Permalink
Removes duplicate test
Browse files Browse the repository at this point in the history
  • Loading branch information
chalmerlowe committed Nov 21, 2024
1 parent 0e9c3b8 commit 2d25e61
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions tests/unit/test_table_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,32 +177,10 @@ def test_table_time_partitioning_date_timestamp_and_datetime_dialect_option(
assert result == expected


def test_table_require_partition_filter_dialect_option(faux_conn):
# expect table creation to fail as SQLite does not support partitioned tables
with pytest.raises(sqlite3.OperationalError):
setup_table(
faux_conn,
"some_table",
sqlalchemy.Column("createdAt", sqlalchemy.DateTime),
bigquery_time_partitioning=TimePartitioning(field="createdAt"),
bigquery_require_partition_filter=True,
)

result = " ".join(faux_conn.test_data["execute"][-1][0].strip().split())
expected = (
"CREATE TABLE `some_table` ( `createdAt` DATETIME )"
" PARTITION BY DATETIME_TRUNC(createdAt, DAY)"
" OPTIONS(require_partition_filter=true)"
)

assert result == expected


# DATETIME WITH FIELD but no TYPE: defaults to DAY
def test_table_time_partitioning_with_field_dialect_option(faux_conn):
"""Expect table creation to fail as SQLite does not support partitioned tables
Confirms that if the column datatype is DATETIME but no TIMEPARTITIONINGTYPE
Confirms that if the column datatype is DATETIME but no TimePartitioning.type_
has been supplied, the system will default to DAY.
"""

Expand Down

0 comments on commit 2d25e61

Please sign in to comment.