Page MenuHomeSoftware Heritage

tests: Turn directory* hypothesis strategies into pytest fixtures
ClosedPublic

Authored by anlambert on Oct 12 2021, 11:47 AM.

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

Build is green

Patch application report for D6457 (id=23465)

Could not rebase; Attempt merge onto d7c16735a4...

Updating d7c16735..81486f51
Fast-forward
 swh/web/tests/api/test_apiresponse.py          |   4 +-
 swh/web/tests/api/test_utils.py                |  12 +-
 swh/web/tests/api/views/test_content.py        |  12 --
 swh/web/tests/api/views/test_directory.py      |   7 -
 swh/web/tests/api/views/test_identifiers.py    |   9 +-
 swh/web/tests/api/views/test_release.py        |   4 +-
 swh/web/tests/api/views/test_revision.py       |   4 +-
 swh/web/tests/api/views/test_vault.py          |  17 +-
 swh/web/tests/browse/views/test_content.py     | 142 +++++++-------
 swh/web/tests/browse/views/test_directory.py   |  18 +-
 swh/web/tests/browse/views/test_identifiers.py |  13 +-
 swh/web/tests/browse/views/test_revision.py    |   3 +-
 swh/web/tests/common/test_archive.py           |  32 +--
 swh/web/tests/common/test_identifiers.py       |  71 +++----
 swh/web/tests/conftest.py                      | 260 ++++++++++++++++++++++++-
 swh/web/tests/misc/test_badges.py              |   4 -
 swh/web/tests/misc/test_iframe.py              |  12 +-
 swh/web/tests/strategies.py                    | 212 +-------------------
 18 files changed, 403 insertions(+), 433 deletions(-)
Changes applied before test
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/1163/ for more details.

This revision is now accepted and ready to land.Oct 12 2021, 12:10 PM