Skip to content

Commit 34bd685

Browse files
committed
more tests
1 parent 885d786 commit 34bd685

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tests/system/small/pandas/test_read_gbq_information_schema.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,27 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import pytest
1516

16-
def test_read_gbq_jobs_by_user_returns_schema(session):
17-
df = session.read_gbq("region-US.INFORMATION_SCHEMA.JOBS_BY_USER")
17+
18+
@pytest.mark.parametrize("include_project", [True, False])
19+
@pytest.mark.parametrize(
20+
"view_id",
21+
[
22+
# https://cloud.google.com/bigquery/docs/information-schema-intro
23+
"region-US.INFORMATION_SCHEMA.JOBS_BY_USER",
24+
"region-US.INFORMATION_SCHEMA.SCHEMATA",
25+
],
26+
)
27+
def test_read_gbq_jobs_by_user_returns_schema(
28+
unordered_session, view_id: str, include_project: bool
29+
):
30+
if include_project:
31+
table_id = unordered_session.bqclient.project + "." + view_id
32+
else:
33+
table_id = view_id
34+
35+
df = unordered_session.read_gbq(table_id)
1836
assert df.dtypes is not None
1937

2038

0 commit comments

Comments
 (0)