Skip to content

Commit

Permalink
test: add system test SQL to run tests locally (#74)
Browse files Browse the repository at this point in the history
* test: add system test SQL to run tests locally

I was missing the `public_samples_copy` dataset when trying to run the
system tests locally.

Also, it is unnecessary to use the `mock` backfill package now that
Python 3.6+ is required.

* revert change to use mock built-in

needs AsyncMock backfill
  • Loading branch information
tswast committed Dec 22, 2020
1 parent cef5d4a commit 3218893
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions tests/system/assets/public_samples_copy.sql
@@ -0,0 +1,17 @@
-- Copyright 2020 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- https://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.

CREATE TABLE public_samples_copy.shakespeare
AS
SELECT * FROM `bigquery-public-data.samples.shakespeare`
3 changes: 2 additions & 1 deletion tests/unit/test_client_v1.py
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from google.api_core.gapic_v1 import client_info
import mock
import pytest

from google.cloud.bigquery_storage import types
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_reader_v1.py
Expand Up @@ -18,10 +18,10 @@
import decimal
import itertools
import json
from unittest import mock

import fastavro
import pyarrow
import mock
import pandas
import pandas.testing
import pytest
Expand Down

0 comments on commit 3218893

Please sign in to comment.