Skip to content

Update tests to pytest

This is done in several steps:

  • conftest: simplify the swh_scheduler() fixture. Simply use the postgresql.dsn as connection string.

  • updater/tests: rewrite updater's tests as pytest functions. The way the scheduler_db and updater_db fixtures are built is not very straighforward nor satisfying, but it works.

  • add a new get_priority_ratios endpoint to the scheduler This is necessary to make it much easier to write tests so they do not need to execute SQL statements, which makes possible to run exactly the same tests with the SchedulerBackend as the RemoteScheduler one (see the following revision).

  • rewrite scheduler tests using pytest and the new rpc fixtures from swh.core.


Migrated from D2146 (view on Phabricator)

Merge request reports