swh:1:snp:eb70f1f85391e4b077c211bec36af0061c4bf937
Revision fb70f881cb379ce04ebd0d8c48d4bfd4f79a5971 authored by David Douard on 30 September 2019, 10:14:47 UTC, committed by David Douard on 14 October 2019, 12:14:08 UTC
- 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.
1 parent 62aff76
History
Tip revision: 728c3eeaae84a7e249a712a5545cc9ba682403c3 authored by David Douard on 08 January 2021, 09:39:42 UTC
Allow to use the JAVA_HOME environment for cassandra tests
Tip revision: 728c3ee
File Mode Size
bin
docs
sql
swh
utils
.gitignore -rw-r--r-- 136 bytes
AUTHORS -rw-r--r-- 112 bytes
CODE_OF_CONDUCT.md -rw-r--r-- 3.3 KB
CONTRIBUTORS -rw-r--r-- 29 bytes
LICENSE -rw-r--r-- 34.3 KB
MANIFEST.in -rw-r--r-- 223 bytes
Makefile -rw-r--r-- 163 bytes
Makefile.local -rw-r--r-- 36 bytes
README.md -rw-r--r-- 4.2 KB
conftest.py -rw-r--r-- 2.7 KB
mypy.ini -rw-r--r-- 789 bytes
pytest.ini -rw-r--r-- 319 bytes
requirements-swh-journal.txt -rw-r--r-- 22 bytes
requirements-swh.txt -rw-r--r-- 73 bytes
requirements-test.txt -rw-r--r-- 63 bytes
requirements.txt -rw-r--r-- 57 bytes
setup.py -rwxr-xr-x 2.4 KB
tox.ini -rw-r--r-- 931 bytes

README.md

back to top