Commit 8da52c2 1 parent 4355e6b commit 8da52c2 Copy full SHA for 8da52c2
File tree 2 files changed +24
-21
lines changed
2 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 2
2
-e .[full ]
3
3
4
4
# Testing
5
- coverage == 7.4.0
5
+ coverage == 7.4.1
6
6
importlib-metadata == 7.0.1
7
7
mypy == 1.8.0
8
- ruff == 0.1.13
8
+ ruff == 0.1.15
9
9
typing_extensions == 4.9.0
10
10
types-contextvars == 2.4.7.3
11
11
types-PyYAML == 6.0.12.12
12
12
types-dataclasses == 0.6.6
13
- pytest == 7.4.4
13
+ pytest == 8.0.0
14
14
trio == 0.24.0
15
15
16
16
# Documentation
17
17
mkdocs == 1.5.3
18
- mkdocs-material == 9.5.5
18
+ mkdocs-material == 9.5.6
19
19
mkautodoc == 0.2.0
20
20
21
21
# Packaging
Original file line number Diff line number Diff line change @@ -684,27 +684,30 @@ def run_shutdown(): # pragma: no cover
684
684
nonlocal shutdown_called
685
685
shutdown_called = True
686
686
687
- with pytest .warns (
688
- UserWarning ,
689
- match = (
690
- "The `lifespan` parameter cannot be used with `on_startup` or `on_shutdown`." # noqa: E501
691
- ),
687
+ with pytest .deprecated_call (
688
+ match = "The on_startup and on_shutdown parameters are deprecated"
692
689
):
693
- app = Router (
694
- on_startup = [run_startup ], on_shutdown = [run_shutdown ], lifespan = lifespan
695
- )
690
+ with pytest .warns (
691
+ UserWarning ,
692
+ match = (
693
+ "The `lifespan` parameter cannot be used with `on_startup` or `on_shutdown`." # noqa: E501
694
+ ),
695
+ ):
696
+ app = Router (
697
+ on_startup = [run_startup ], on_shutdown = [run_shutdown ], lifespan = lifespan
698
+ )
696
699
697
- assert not lifespan_called
698
- assert not startup_called
699
- assert not shutdown_called
700
+ assert not lifespan_called
701
+ assert not startup_called
702
+ assert not shutdown_called
700
703
701
- # Triggers the lifespan events
702
- with test_client_factory (app ):
703
- ...
704
+ # Triggers the lifespan events
705
+ with test_client_factory (app ):
706
+ ...
704
707
705
- assert lifespan_called
706
- assert not startup_called
707
- assert not shutdown_called
708
+ assert lifespan_called
709
+ assert not startup_called
710
+ assert not shutdown_called
708
711
709
712
710
713
def test_lifespan_sync (test_client_factory ):
You can’t perform that action at this time.
0 commit comments