Page MenuHomeSoftware Heritage

tests: Turn remaining hypothesis strategies into pytest fixtures
ClosedPublic

Authored by anlambert on Oct 12 2021, 5:25 PM.

Details

Summary

Apart a couple strategies who are still used in some swh-web test inputs,
turn the remaining ones into pytest fixtures.

Closes T3603

Depends on D6461

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert retitled this revision from tests: Turn remaining hypothesis strategies to pytest fixtures to tests: Turn remaining hypothesis strategies into pytest fixtures.Oct 12 2021, 5:27 PM

Build is green

Patch application report for D6463 (id=23476)

Could not rebase; Attempt merge onto d7c16735a4...

Updating d7c16735..238c21ef
Fast-forward
 swh/web/tests/api/test_apiresponse.py          |   3 -
 swh/web/tests/api/test_utils.py                |  46 +-
 swh/web/tests/api/views/test_content.py        |  12 -
 swh/web/tests/api/views/test_directory.py      |   7 -
 swh/web/tests/api/views/test_graph.py          |   6 +-
 swh/web/tests/api/views/test_identifiers.py    |  26 +-
 swh/web/tests/api/views/test_origin.py         |   5 +-
 swh/web/tests/api/views/test_release.py        |   6 -
 swh/web/tests/api/views/test_revision.py       |  13 +-
 swh/web/tests/api/views/test_snapshot.py       |  17 +-
 swh/web/tests/api/views/test_vault.py          |  12 -
 swh/web/tests/browse/test_snapshot_context.py  |  39 +-
 swh/web/tests/browse/views/test_content.py     | 192 ++++----
 swh/web/tests/browse/views/test_directory.py   |  75 ++-
 swh/web/tests/browse/views/test_identifiers.py |  20 -
 swh/web/tests/browse/views/test_origin.py      | 121 ++---
 swh/web/tests/browse/views/test_release.py     |  18 +-
 swh/web/tests/browse/views/test_revision.py    |  19 +-
 swh/web/tests/common/test_archive.py           | 103 +---
 swh/web/tests/common/test_identifiers.py       | 112 ++---
 swh/web/tests/common/test_middlewares.py       |   4 -
 swh/web/tests/common/test_origin_visits.py     |  21 +-
 swh/web/tests/conftest.py                      | 575 +++++++++++++++++++++-
 swh/web/tests/misc/test_badges.py              |  37 +-
 swh/web/tests/misc/test_iframe.py              |  14 -
 swh/web/tests/strategies.py                    | 638 +------------------------
 26 files changed, 888 insertions(+), 1253 deletions(-)
Changes applied before test
commit 238c21ef9e6b060e1c39f5653a8e7f30ed98671a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 17:21:41 2021 +0200

    tests: Turn remaining hypothesis strategies to pytest fixtures
    
    Apart a couple strategies who are still used in some swh-web test inputs,
    turn the remaining ones into pytest fixtures.
    
    Closes T3603

commit 2b1374a568892443f6d8a02e032185df8c3ed3c5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 15:52:31 2021 +0200

    tests: Turn snapshot* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 341454015ded898208886aff905c92634a6deefe
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 15:26:40 2021 +0200

    tests: Turn revision* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit c4fed93688b1658684ee5792eb020272750f9de1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 14:08:49 2021 +0200

    tests: Turn release* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit c2d10c90c3bd6f5fa3634fa456475c3fa92ae194
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 13:48:57 2021 +0200

    tests: Turn origin* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 81486f517526f7cb94e0ca2ed49433ebd7c3d1b3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 11:45:43 2021 +0200

    tests: Turn directory* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 23a8dc33453fdcf3fb0037ba1c0c76752d40c1c4
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Oct 11 15:17:58 2021 +0200

    tests: Turn content* hypothesis strategies into pytest fixtures
    
    Using such hypothesis strategies have several drawbacks so let's
    turn them into pytest fixtures as it feels a better way to do so.
    
    Related to T3603

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

Build is green

Patch application report for D6463 (id=23477)

Could not rebase; Attempt merge onto d7c16735a4...

Updating d7c16735..ad6e3bb6
Fast-forward
 swh/web/tests/api/test_apiresponse.py          |   3 -
 swh/web/tests/api/test_utils.py                |  46 +-
 swh/web/tests/api/views/test_content.py        |  12 -
 swh/web/tests/api/views/test_directory.py      |   7 -
 swh/web/tests/api/views/test_graph.py          |   6 +-
 swh/web/tests/api/views/test_identifiers.py    |  26 +-
 swh/web/tests/api/views/test_origin.py         |   5 +-
 swh/web/tests/api/views/test_release.py        |   6 -
 swh/web/tests/api/views/test_revision.py       |  13 +-
 swh/web/tests/api/views/test_snapshot.py       |  17 +-
 swh/web/tests/api/views/test_vault.py          |  12 -
 swh/web/tests/browse/test_snapshot_context.py  |  39 +-
 swh/web/tests/browse/views/test_content.py     | 192 ++++----
 swh/web/tests/browse/views/test_directory.py   |  75 ++-
 swh/web/tests/browse/views/test_identifiers.py |  20 -
 swh/web/tests/browse/views/test_origin.py      | 121 ++---
 swh/web/tests/browse/views/test_release.py     |  18 +-
 swh/web/tests/browse/views/test_revision.py    |  19 +-
 swh/web/tests/common/test_archive.py           | 103 +---
 swh/web/tests/common/test_identifiers.py       | 112 ++---
 swh/web/tests/common/test_middlewares.py       |   4 -
 swh/web/tests/common/test_origin_visits.py     |  21 +-
 swh/web/tests/conftest.py                      | 575 +++++++++++++++++++++-
 swh/web/tests/misc/test_badges.py              |  37 +-
 swh/web/tests/misc/test_iframe.py              |  14 -
 swh/web/tests/strategies.py                    | 638 +------------------------
 26 files changed, 888 insertions(+), 1253 deletions(-)
Changes applied before test
commit ad6e3bb6c0f5d21780889db35c74663ea88fc984
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 17:21:41 2021 +0200

    tests: Turn remaining hypothesis strategies into pytest fixtures
    
    Apart a couple strategies who are still used in some swh-web test inputs,
    turn the remaining ones into pytest fixtures.
    
    Closes T3603

commit 2b1374a568892443f6d8a02e032185df8c3ed3c5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 15:52:31 2021 +0200

    tests: Turn snapshot* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 341454015ded898208886aff905c92634a6deefe
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 15:26:40 2021 +0200

    tests: Turn revision* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit c4fed93688b1658684ee5792eb020272750f9de1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 14:08:49 2021 +0200

    tests: Turn release* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit c2d10c90c3bd6f5fa3634fa456475c3fa92ae194
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 13:48:57 2021 +0200

    tests: Turn origin* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 81486f517526f7cb94e0ca2ed49433ebd7c3d1b3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 11:45:43 2021 +0200

    tests: Turn directory* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 23a8dc33453fdcf3fb0037ba1c0c76752d40c1c4
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Oct 11 15:17:58 2021 +0200

    tests: Turn content* hypothesis strategies into pytest fixtures
    
    Using such hypothesis strategies have several drawbacks so let's
    turn them into pytest fixtures as it feels a better way to do so.
    
    Related to T3603

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

This revision is now accepted and ready to land.Oct 13 2021, 3:00 PM

Build is green

Patch application report for D6463 (id=23490)

Could not rebase; Attempt merge onto d7c16735a4...

Updating d7c16735..a200f70f
Fast-forward
 swh/web/tests/api/test_apiresponse.py          |   3 -
 swh/web/tests/api/test_utils.py                |  46 +-
 swh/web/tests/api/views/test_content.py        |  12 -
 swh/web/tests/api/views/test_directory.py      |   7 -
 swh/web/tests/api/views/test_graph.py          |   6 +-
 swh/web/tests/api/views/test_identifiers.py    |  26 +-
 swh/web/tests/api/views/test_origin.py         |   5 +-
 swh/web/tests/api/views/test_release.py        |   6 -
 swh/web/tests/api/views/test_revision.py       |  13 +-
 swh/web/tests/api/views/test_snapshot.py       |  17 +-
 swh/web/tests/api/views/test_vault.py          |  12 -
 swh/web/tests/browse/test_snapshot_context.py  |  39 +-
 swh/web/tests/browse/views/test_content.py     | 192 ++++----
 swh/web/tests/browse/views/test_directory.py   |  75 ++-
 swh/web/tests/browse/views/test_identifiers.py |  20 -
 swh/web/tests/browse/views/test_origin.py      | 121 ++---
 swh/web/tests/browse/views/test_release.py     |  18 +-
 swh/web/tests/browse/views/test_revision.py    |  19 +-
 swh/web/tests/common/test_archive.py           | 103 +---
 swh/web/tests/common/test_identifiers.py       | 112 ++---
 swh/web/tests/common/test_middlewares.py       |   4 -
 swh/web/tests/common/test_origin_visits.py     |  21 +-
 swh/web/tests/conftest.py                      | 575 +++++++++++++++++++++-
 swh/web/tests/misc/test_badges.py              |  37 +-
 swh/web/tests/misc/test_iframe.py              |  14 -
 swh/web/tests/strategies.py                    | 638 +------------------------
 26 files changed, 888 insertions(+), 1253 deletions(-)
Changes applied before test
commit a200f70f2ce91ec129057c3a8201e217835e5714
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 17:21:41 2021 +0200

    tests: Turn remaining hypothesis strategies into pytest fixtures
    
    Apart a couple strategies who are still used in some swh-web test inputs,
    turn the remaining ones into pytest fixtures.
    
    Closes T3603

commit a91200cbe1e57ead8351d6bb674e83f750e997d7
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 15:52:31 2021 +0200

    tests: Turn snapshot* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 341454015ded898208886aff905c92634a6deefe
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 15:26:40 2021 +0200

    tests: Turn revision* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit c4fed93688b1658684ee5792eb020272750f9de1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 14:08:49 2021 +0200

    tests: Turn release* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit c2d10c90c3bd6f5fa3634fa456475c3fa92ae194
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 13:48:57 2021 +0200

    tests: Turn origin* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 81486f517526f7cb94e0ca2ed49433ebd7c3d1b3
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 12 11:45:43 2021 +0200

    tests: Turn directory* hypothesis strategies into pytest fixtures
    
    Related to T3603

commit 23a8dc33453fdcf3fb0037ba1c0c76752d40c1c4
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Oct 11 15:17:58 2021 +0200

    tests: Turn content* hypothesis strategies into pytest fixtures
    
    Using such hypothesis strategies have several drawbacks so let's
    turn them into pytest fixtures as it feels a better way to do so.
    
    Related to T3603

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