diff --git a/tests/system/data/setup_fixtures.py b/tests/system/data/setup_fixtures.py index a2858a29d..77086b7f3 100644 --- a/tests/system/data/setup_fixtures.py +++ b/tests/system/data/setup_fixtures.py @@ -41,6 +41,7 @@ def admin_client(): client = Client(admin=True) yield client + @pytest.fixture(scope="session") def instance_id(admin_client, project_id, cluster_config): """ @@ -142,7 +143,9 @@ def table_id( yield init_table_id print(f"Deleting table: {parent_path}/tables/{init_table_id}") try: - admin_client.table_admin_client.delete_table(name=f"{parent_path}/tables/{init_table_id}") + admin_client.table_admin_client.delete_table( + name=f"{parent_path}/tables/{init_table_id}" + ) except exceptions.NotFound: print(f"Table {init_table_id} not found, skipping deletion") diff --git a/tests/system/data/test_system.py b/tests/system/data/test_system.py index 2a7adee35..4c977f00a 100644 --- a/tests/system/data/test_system.py +++ b/tests/system/data/test_system.py @@ -197,7 +197,9 @@ async def test_mutation_set_cell(table, temp_rows): assert (await _retrieve_cell_value(table, row_key)) == new_value -@pytest.mark.skipif(bool(os.environ.get(BIGTABLE_EMULATOR)), reason="emulator doesn't use splits") +@pytest.mark.skipif( + bool(os.environ.get(BIGTABLE_EMULATOR)), reason="emulator doesn't use splits" +) @pytest.mark.usefixtures("client") @pytest.mark.usefixtures("table") @retry.AsyncRetry(predicate=retry.if_exception_type(ClientError), initial=1, maximum=5) @@ -811,7 +813,10 @@ async def test_read_row(table, temp_rows): assert row.cells[0].value == b"value" -@pytest.mark.skipif(bool(os.environ.get(BIGTABLE_EMULATOR)), reason="emulator doesn't raise InvalidArgument") +@pytest.mark.skipif( + bool(os.environ.get(BIGTABLE_EMULATOR)), + reason="emulator doesn't raise InvalidArgument", +) @pytest.mark.usefixtures("table") @pytest.mark.asyncio async def test_read_row_missing(table): @@ -847,7 +852,10 @@ async def test_read_row_w_filter(table, temp_rows): assert row.cells[0].labels == [expected_label] -@pytest.mark.skipif(bool(os.environ.get(BIGTABLE_EMULATOR)), reason="emulator doesn't raise InvalidArgument") +@pytest.mark.skipif( + bool(os.environ.get(BIGTABLE_EMULATOR)), + reason="emulator doesn't raise InvalidArgument", +) @pytest.mark.usefixtures("table") @pytest.mark.asyncio async def test_row_exists(table, temp_rows):