Page MenuHomeSoftware Heritage

pytest_plugin: Fix mypy error and use FixtureRequest public import
AbandonedPublicDraft

Authored by anlambert on Apr 6 2022, 1:49 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary
(swh) ✔ ~/swh/swh-environment/swh-core [master|⚑ 4] 
13:47 $ pre-commit run -a mypy
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

swh/core/pytest_plugin.py:138: error: "FixtureRequest" has no attribute "fspath"; maybe "path"?
Found 1 error in 1 file (checked 54 source files)

Diff Detail

Event Timeline

Build has FAILED

Patch application report for D7512 (id=27250)

Rebasing onto 2a2615357b...

Current branch diff-target is up to date.
Changes applied before test
commit 41211750557ea86ce12519c2764dfc55f38a52a0
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Apr 6 13:48:24 2022 +0200

    pytest_plugin: Fix mypy error and use FixtureRequest public import

Link to build: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/383/
See console output for more information: https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/383/console

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 6 2022, 1:50 PM
Harbormaster failed remote builds in B28156: Diff 27250!

My bad, I had pytest 7.1.1 installed in my venv but we use pytest < 7.