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

Commit71a8e9a

Browse files
committed
fix pytest collect hook
1 parent97f2255 commit71a8e9a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎tests/conftest.py‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,16 @@ def pytest_make_collect_report(collector):
6565
https://github.com/duckdblabs/duckdb-internal/issues/6182
6666
"""
6767
outcome=yield
68-
result=outcome.get_result()
68+
report:pytest.CollectReport=outcome.get_result()
6969

7070
ifsys.version_info[:2]== (3,14):
7171
# Only handle failures from module collectors
72-
ifresult.failedandcollector.__class__.__name__=="Module":
73-
longrepr=str(result.longrepr)
74-
if"ModuleNotFoundError: No module named 'pyarrow'"inlongrepr:
75-
result.outcome="skipped"
76-
result.longrepr=f"XFAIL: pyarrow not available{collector.name} ({longrepr.strip()})"
72+
ifreport.failedandcollector.__class__.__name__=="Module":
73+
longreprtext=report.longreprtext
74+
if"ModuleNotFoundError: No module named 'pyarrow'"inlongreprtext:
75+
report.outcome="skipped"
76+
reason=f"XFAIL: [pyarrow not available]{longreprtext}"
77+
report.longrepr= (report.fspath,None,reason)
7778

7879

7980
# https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp