Commit ef8090e 1 parent f6bbf79 commit ef8090e Copy full SHA for ef8090e
File tree 5 files changed +11
-6
lines changed
tests/test_tutorial/test_soonify_return
5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.7
1
+ FROM python:3.8
2
2
3
3
RUN pip install --no-cache-dir httpx "pydantic==1.5.1" pygithub
4
4
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ jobs:
21
21
strategy :
22
22
matrix :
23
23
python-version :
24
- - " 3.7"
25
24
- " 3.8"
26
25
- " 3.9"
27
26
- " 3.10"
27
+ - " 3.11"
28
28
fail-fast : false
29
29
30
30
steps :
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def wrapper(
158
158
soon_value : SoonValue [T ] = SoonValue ()
159
159
160
160
@functools .wraps (partial_f )
161
- async def value_wrapper () -> None :
161
+ async def value_wrapper (* args : Any ) -> None :
162
162
value = await partial_f ()
163
163
soon_value ._stored_value = value
164
164
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ classifiers = [
28
28
]
29
29
30
30
[tool .poetry .dependencies ]
31
- python = " ^3.7 "
32
- anyio = " ^ 3.4.0"
31
+ python = " ^3.8 "
32
+ anyio = " >= 3.4.0,<5 .0"
33
33
34
34
[tool .poetry .dev-dependencies ]
35
35
pytest = " ^7.0.1"
Original file line number Diff line number Diff line change
1
+ import sys
1
2
from unittest .mock import patch
2
3
3
4
import asyncer
4
5
import pytest
5
6
7
+ if sys .version_info < (3 , 11 ):
8
+ from exceptiongroup import ExceptionGroup
9
+
6
10
from ...conftest import get_testing_print_function
7
11
8
12
@@ -12,9 +16,10 @@ def test_tutorial():
12
16
new_print = get_testing_print_function (calls )
13
17
14
18
with patch ("builtins.print" , new = new_print ):
15
- with pytest .raises (asyncer . PendingValueException ) :
19
+ with pytest .raises (ExceptionGroup ) as e :
16
20
from docs_src .tutorial .soonify_return import tutorial002 as mod
17
21
18
22
# Avoid autoflake removing this import
19
23
assert mod # pragma: nocover
24
+ assert isinstance (e .value .exceptions [0 ], asyncer .PendingValueException )
20
25
assert calls == []
You can’t perform that action at this time.
0 commit comments