Page MenuHomeSoftware Heritage

Replace stateful hypothesis strategies by pytest fixtures
Closed, MigratedEdits Locked

Description

swh-web define hypothesis strategies to provide test inputs from a sample archive populated with small git repositories.

While it enables to deeply test webapp code, it has several drawbacks:

  • tests execution are slow as multiple examples are generated by hypothesis
  • tests data are generated at module loading time which is not a good practice
  • some strategies are stateful which does not play well with hypothesis to get reproducible examples

We should replace those strategies by simple pytest fixtures instead.

Event Timeline

anlambert renamed this task from Replace non stateful hypothesis strategies by pytest fixtures to Replace stateful hypothesis strategies by pytest fixtures.Sep 23 2021, 2:12 PM
anlambert triaged this task as Normal priority.
anlambert created this task.