mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Update deprecated usages of hypothesis
This commit is contained in:
parent
2e7e31fdbf
commit
688d6f907f
5 changed files with 7 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
hypothesis>=5.0.0,<7.0.0
|
||||
hypothesis>=6.72.0,<7.0.0
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-httpserver
|
||||
|
|
|
|||
|
|
@ -103,10 +103,8 @@ X-SOMETHING:{r}
|
|||
HAHA:YES
|
||||
END:FOO"""
|
||||
|
||||
printable_characters_strategy = st.text(
|
||||
st.characters(blacklist_categories=("Cc", "Cs"))
|
||||
)
|
||||
printable_characters_strategy = st.text(st.characters(exclude_categories=("Cc", "Cs")))
|
||||
|
||||
uid_strategy = st.text(
|
||||
st.characters(blacklist_categories=("Zs", "Zl", "Zp", "Cc", "Cs")), min_size=1
|
||||
st.characters(exclude_categories=("Zs", "Zl", "Zp", "Cc", "Cs")), min_size=1
|
||||
).filter(lambda x: x.strip() == x)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ settings.register_profile(
|
|||
"deterministic",
|
||||
settings(
|
||||
derandomize=True,
|
||||
suppress_health_check=HealthCheck.all(),
|
||||
suppress_health_check=list(HealthCheck),
|
||||
),
|
||||
)
|
||||
settings.register_profile("dev", settings(suppress_health_check=[HealthCheck.too_slow]))
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from vdirsyncer.vobject import Item
|
|||
|
||||
@given(uid=uid_strategy)
|
||||
# Using the random module for UIDs:
|
||||
@settings(suppress_health_check=HealthCheck.all())
|
||||
@settings(suppress_health_check=list(HealthCheck))
|
||||
@pytest.mark.asyncio
|
||||
async def test_repair_uids(uid):
|
||||
s = MemoryStorage()
|
||||
|
|
@ -40,7 +40,7 @@ async def test_repair_uids(uid):
|
|||
|
||||
@given(uid=uid_strategy.filter(lambda x: not href_safe(x)))
|
||||
# Using the random module for UIDs:
|
||||
@settings(suppress_health_check=HealthCheck.all())
|
||||
@settings(suppress_health_check=list(HealthCheck))
|
||||
@pytest.mark.asyncio
|
||||
async def test_repair_unsafe_uids(uid):
|
||||
s = MemoryStorage()
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ def test_input_types():
|
|||
|
||||
value_strategy = st.text(
|
||||
st.characters(
|
||||
blacklist_categories=("Zs", "Zl", "Zp", "Cc", "Cs"), blacklist_characters=":="
|
||||
exclude_categories=("Zs", "Zl", "Zp", "Cc", "Cs"), exclude_characters=":="
|
||||
),
|
||||
min_size=1,
|
||||
).filter(lambda x: x.strip() == x)
|
||||
|
|
|
|||
Loading…
Reference in a new issue