Skip to content

Commit 398e2d7

Browse files
Apply suggestions from code review
Co-authored-by: Kevin Liu <kevinjqliu@users.noreply.github.com>
1 parent 3f63e6c commit 398e2d7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pyiceberg/catalog/s3tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def create_table(
141141
schema: Schema = self._convert_schema_if_needed(schema) # type: ignore
142142

143143
# creating a new table with S3 Tables is a two step process. We first have to create an S3 Table with the
144-
# S3 Tables API and then write the new metadata.json to the warehouseLocaiton associated with the newly
144+
# S3 Tables API and then write the new metadata.json to the warehouseLocation associated with the newly
145145
# created S3 Table.
146146
try:
147147
self.s3tables.create_table(

tests/catalog/test_s3tables.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ def table_bucket_arn() -> str:
2626
# in one of the supported regions.
2727

2828
return os.environ["ARN"]
29+
@pytest.fixture
30+
def aws_region() -> str:
31+
import os
2932

33+
return os.environ["AWS_REGION"]
3034

3135
@pytest.fixture
32-
def catalog(table_bucket_arn: str) -> S3TableCatalog:
33-
properties = {"s3tables.table-bucket-arn": table_bucket_arn, "s3tables.region": "us-east-1", "s3.region": "us-east-1"}
36+
def catalog(table_bucket_arn: str, aws_region: str) -> S3TableCatalog:
37+
properties = {"s3tables.table-bucket-arn": table_bucket_arn, "s3tables.region": aws_region}
3438
return S3TableCatalog(name="test_s3tables_catalog", **properties)
3539

3640

0 commit comments

Comments
 (0)