Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c82dcf

Browse files
committed
undo bad commit, remove unneeded version checks
1 parent9331a7e commit5c82dcf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎tests/unit/job/test_query_pandas.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
importjson
1818

1919
importmock
20-
importpkg_resources
2120
importpytest
2221

2322

@@ -45,14 +44,19 @@
4544
except (ImportError,AttributeError):# pragma: NO COVER
4645
tqdm=None
4746

47+
try:
48+
importimportlib.metadataasmetadata
49+
exceptImportError:
50+
importimportlib_metadataasmetadata
51+
4852
from ..helpersimportmake_connection
4953
from .helpersimport_make_client
5054
from .helpersimport_make_job_resource
5155

5256
ifpandasisnotNone:
53-
PANDAS_INSTALLED_VERSION=pkg_resources.get_distribution("pandas").parsed_version
57+
PANDAS_INSTALLED_VERSION=metadata.version("pandas")
5458
else:
55-
PANDAS_INSTALLED_VERSION=pkg_resources.parse_version("0.0.0")
59+
PANDAS_INSTALLED_VERSION="0.0.0"
5660

5761
pandas=pytest.importorskip("pandas")
5862

@@ -656,9 +660,7 @@ def test_to_dataframe_bqstorage_no_pyarrow_compression():
656660
)
657661

658662

659-
@pytest.mark.skipif(
660-
PANDAS_INSTALLED_VERSION>=pkg_resources.parse_version("2.0.0"),reason=""
661-
)
663+
@pytest.mark.skipif(PANDAS_INSTALLED_VERSION[0:2]notin ["0.","1."],reason="")
662664
@pytest.mark.skipif(pyarrowisNone,reason="Requires `pyarrow`")
663665
deftest_to_dataframe_column_dtypes():
664666
fromgoogle.cloud.bigquery.jobimportQueryJobastarget_class

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp