mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Close status even if assertions fail
This commit is contained in:
parent
c77b22334a
commit
29312e87c5
1 changed files with 11 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
|
||||
import hypothesis.strategies as st
|
||||
from hypothesis import assume
|
||||
from hypothesis import given
|
||||
|
|
@ -24,7 +26,7 @@ def test_legacy_status(status_dict):
|
|||
hrefs_a = {meta_a["href"] for meta_a, meta_b in status_dict.values()}
|
||||
hrefs_b = {meta_b["href"] for meta_a, meta_b in status_dict.values()}
|
||||
assume(len(hrefs_a) == len(status_dict) == len(hrefs_b))
|
||||
status = SqliteStatus()
|
||||
with contextlib.closing(SqliteStatus()) as status:
|
||||
status.load_legacy_status(status_dict)
|
||||
assert dict(status.to_legacy_status()) == status_dict
|
||||
|
||||
|
|
@ -34,5 +36,3 @@ def test_legacy_status(status_dict):
|
|||
assert meta2_a.to_status() == meta_a
|
||||
assert meta2_b.to_status() == meta_b
|
||||
assert ident_a == ident_b == ident
|
||||
|
||||
status.close()
|
||||
|
|
|
|||
Loading…
Reference in a new issue