File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Upcoming
4+
5+ - test: make sure pytest exits completely after running async tests
6+
37## Version 0.21.1
48
59- refactor: add ` WithState ` class to be the return value of the ` store.with_state ` so that it can report correct signature of its ` __call__ ` method
Original file line number Diff line number Diff line change 2323from redux .main import Store
2424
2525if TYPE_CHECKING :
26- from collections .abc import Generator
27-
2826 from redux_pytest .fixtures .event_loop import LoopThread
2927
3028INCREMENTS = 20
@@ -70,16 +68,15 @@ def reducer(
7068
7169
7270@pytest .fixture
73- def store (event_loop : LoopThread ) -> Generator [ StoreType , None , None ] :
74- store = Store (
71+ def store (event_loop : LoopThread ) -> StoreType :
72+ return Store (
7573 reducer ,
7674 options = CreateStoreOptions (
7775 auto_init = True ,
7876 task_creator = event_loop .create_task ,
77+ on_finish = event_loop .stop ,
7978 ),
8079 )
81- yield store
82- store .subscribe_event (FinishEvent , lambda : event_loop .stop ())
8380
8481
8582def dispatch_actions (store : StoreType ) -> None :
You can’t perform that action at this time.
0 commit comments