HomeSoftware Heritage

tests: refactor main storage tests

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

tests: refactor main storage tests

  • use pytest instead of unittest.TestCase plumbing
  • extract data from the TestStorageData into a data storage_data module; this module also provide a simple helper StorageData class that mimics the original class (access by attributes),
  • implement a series of pytest fixtures for these storage specific tests,
  • get rid of most hypothesis-based tests,
  • replace usage of the use_url hypothesis boolean statetgy by pytest.mark.parametrize fixtures; this allows to prevent from the need of resetting the storage, since tests are truly executed twice (thus with a new swh_storage),
  • refactor test_db to use pytest-postgresql.

Disable (xfail) tests from test_snapshot.py, test_api_client
and test_in_memory for now.

Fixes/refactorings come with following revisions.

Details

Provenance
douarddaAuthored on Sep 30 2019, 12:14 PM
vlorentzPushed on Oct 30 2019, 5:21 PM
Differential Revision
D2090: tests: refactor main storage tests

Commit No Longer Exists

This commit no longer exists in the repository.