decred / tinydecred

Python tools for Decred
ISC License
27 stars 14 forks source link

tests: use in-memory databases #116

Closed teknico closed 4 years ago

teknico commented 4 years ago

Use in-memory sqlite3 databases in all tests instead of TemporaryDirectory from stdlib or the tmp_path pytest fixture.

Also convert tests/integration/dcr/test_dcrdata.py to the pytest format.

The diff is somewhat messed up by the large de-indented blocks, unfortunately.

NOTE: originally I converted the tests to use the pytest's tmpdir feature, but then realized that using in-memory databases would be simpler and make tests faster.