Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 1554b31

Browse files
committed
Used pytest.mark.skipif
1 parent 9211df6 commit 1554b31

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

tests/system/admin_overlay/test_system_async.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ async def assert_table_cell_value_equal_to(
279279
}
280280
)
281281
@CrossSync.pytest
282+
@pytest.mark.skipif(
283+
os.getenv(BIGTABLE_EMULATOR),
284+
reason="Backups are not supported in the Bigtable emulator",
285+
)
282286
@pytest.mark.parametrize(
283287
"second_instance_storage_type,expect_optimize_operation",
284288
[
@@ -296,11 +300,6 @@ async def test_optimize_restored_table(
296300
second_instance_storage_type,
297301
expect_optimize_operation,
298302
):
299-
if os.getenv(BIGTABLE_EMULATOR):
300-
pytest.skip(
301-
reason="Backups are not supported in the Bigtable emulator",
302-
)
303-
304303
# Create two instances. We backup a table from the first instance to a new table in the
305304
# second instance. This is to test whether or not different scenarios trigger an
306305
# optimize_restored_table operation

tests/system/admin_overlay/test_system_autogen.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ def assert_table_cell_value_equal_to(
206206
assert latest_cell.value.decode("utf-8") == value
207207

208208

209+
@pytest.mark.skipif(
210+
os.getenv(BIGTABLE_EMULATOR),
211+
reason="Backups are not supported in the Bigtable emulator",
212+
)
209213
@pytest.mark.parametrize(
210214
"second_instance_storage_type,expect_optimize_operation",
211215
[(admin_v2.StorageType.HDD, False), (admin_v2.StorageType.SSD, True)],
@@ -220,8 +224,6 @@ def test_optimize_restored_table(
220224
second_instance_storage_type,
221225
expect_optimize_operation,
222226
):
223-
if os.getenv(BIGTABLE_EMULATOR):
224-
pytest.skip(reason="Backups are not supported in the Bigtable emulator")
225227
(instance_with_backup, table_to_backup) = create_instance(
226228
instance_admin_client,
227229
table_admin_client,

0 commit comments

Comments
 (0)