Page MenuHomeSoftware Heritage

pytest: Define plugin and declare it in the root conftest
ClosedPublic

Authored by ardumont on Sep 1 2020, 5:50 PM.

Details

Summary

Then drop all unneeded and indirect imports

Test Plan

tox

Diff Detail

Repository
rDLS Listers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D3858 (id=13631)

Rebasing onto e99d3464e4...

Current branch diff-target is up to date.
Changes applied before test
commit 52898aa4bec08500f16707d17e2c45eb4ef3a2e9
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Sep 1 17:43:01 2020 +0200

    pytest: Define plugin and declare it in the root conftest
    
    Then drop all unneeded and indirect imports

See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/29/ for more details.

olasd added a subscriber: olasd.

I think you could have dropped the imports without moving the fixture. I guess I should have done that in 211f4610d :)

This revision is now accepted and ready to land.Sep 2 2020, 10:04 AM
In D3858#95388, @olasd wrote:

I think you could have dropped the imports without moving the fixture.

The main question really is:

  • does another module import the swh-lister pytest plugin
  • is it really sensible to export the mock_get_scheduler fixture there?

does another module import the swh-lister pytest plugin

I don't think so.

I think you could have dropped the imports without moving the fixture. I guess I should have done that in 211f4610d :)

yes, i think you are right.
Although, i find it clearer if we make it go there...

is it really sensible to export the mock_get_scheduler fixture there?

yeah, maybe not, so i will leave it in the root conftest.

Thanks!

Adapt according to review, do not expose mock_get_scheduler in the pytest-plugin.

Build is green

Patch application report for D3858 (id=13636)

Rebasing onto e99d3464e4...

Current branch diff-target is up to date.
Changes applied before test
commit 9437a643ad734f9fbfb0a8e2bcc939120f22e5e8
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Sep 1 17:43:01 2020 +0200

    pytest: Define plugin and declare it in the root conftest
    
    Then drop all unneeded and indirect imports

See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/33/ for more details.