Skip to content

Commit d4da552

Browse files
dstansbydcherian
andauthored
Speed up hypothesis tests (#2650)
* Reduce number of examples in hypothesis tests * Change max tests to 50 * Update tests/test_store/test_stateful.py Co-authored-by: Deepak Cherian <[email protected]> --------- Co-authored-by: Deepak Cherian <[email protected]>
1 parent 0220e45 commit d4da552

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/test_store/test_stateful.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def mk_test_instance_sync() -> ZarrHierarchyStateMachine:
1818
pytest.skip(reason="ZipStore does not support delete")
1919
if isinstance(sync_store, MemoryStore):
2020
run_state_machine_as_test(
21-
mk_test_instance_sync, settings=Settings(report_multiple_bugs=False)
21+
mk_test_instance_sync, settings=Settings(report_multiple_bugs=False, max_examples=50)
2222
)
2323

2424

@@ -28,6 +28,11 @@ def mk_test_instance_sync() -> None:
2828

2929
if isinstance(sync_store, ZipStore):
3030
pytest.skip(reason="ZipStore does not support delete")
31-
if isinstance(sync_store, LocalStore):
31+
elif isinstance(sync_store, LocalStore):
3232
pytest.skip(reason="This test has errors")
33-
run_state_machine_as_test(mk_test_instance_sync, settings=Settings(report_multiple_bugs=True))
33+
elif isinstance(sync_store, MemoryStore):
34+
run_state_machine_as_test(mk_test_instance_sync, settings=Settings(max_examples=50))
35+
else:
36+
run_state_machine_as_test(
37+
mk_test_instance_sync, settings=Settings(report_multiple_bugs=True)
38+
)

0 commit comments

Comments
 (0)