Skip to content

Commit d4ebb0c

Browse files
authored
fix: edit units for time in tests (#655)
* fix: edit units for time in tests * fix: updates timestamp precision for additional tests * fix: tweaking another time resolution * fix: tweaking yet another time resolution * trying out an option * minor syntax tweak, added comma * fix linting * test addition of dtypes to results * Update tests/system/test_gbq.py * Update tests/system/test_read_gbq.py * add tests to dtypes dict * Update tests/system/test_read_gbq.py * Update tests/system/test_gbq.py * try again * add version check and skipif on several tests * Update tests/system/test_read_gbq.py * blacken/lint the file * Adds a skipif statement to an additional test * blacken the code
1 parent 7978a91 commit d4ebb0c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/system/test_gbq.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# -*- coding: utf-8 -*-
66

77
import datetime
8+
import packaging.version
89
import sys
910

1011
import numpy as np
@@ -997,6 +998,9 @@ def test_upload_data_with_missing_schema_fields_raises_error(self, project_id):
997998
table_schema=test_schema,
998999
)
9991000

1001+
@pytest.mark.skipif(
1002+
packaging.version.parse(pandas.__version__).release >= (2, 0), reason=""
1003+
)
10001004
def test_upload_data_with_timestamp(self, project_id):
10011005
test_id = "21"
10021006
test_size = 6

tests/system/test_read_gbq.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import collections
66
import datetime
77
import decimal
8+
import packaging.version
89
import random
910

1011
import db_dtypes
@@ -38,6 +39,9 @@ def writable_table(
3839
bigquery_client.delete_table(full_table_id)
3940

4041

42+
@pytest.mark.skipif(
43+
packaging.version.parse(pandas.__version__).release >= (2, 0), reason=""
44+
)
4145
@pytest.mark.parametrize(["use_bqstorage_api"], [(True,), (False,)])
4246
@pytest.mark.parametrize(
4347
["query", "expected", "use_bqstorage_apis"],
@@ -545,6 +549,7 @@ def writable_table(
545549
def test_default_dtypes(
546550
read_gbq, query, expected, use_bqstorage_apis, use_bqstorage_api
547551
):
552+
548553
if use_bqstorage_api not in use_bqstorage_apis:
549554
pytest.skip(f"use_bqstorage_api={use_bqstorage_api} not supported.")
550555
# the parameter useQueryCache=False is used in the following function call

0 commit comments

Comments
 (0)