File tree Expand file tree Collapse file tree 6 files changed +11
-32
lines changed
Expand file tree Collapse file tree 6 files changed +11
-32
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ fn main() -> PyResult<()> {
515515 assert! (uvloop
516516 . bind (py )
517517 . getattr (" Loop" )?
518- . downcast :: <PyType >()
518+ . cast :: <PyType >()
519519 . unwrap ()
520520 . is_instance (& pyo3_async_runtimes :: async_std :: get_current_loop (py )? )? );
521521 Ok (())
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ async fn test_cancel() -> PyResult<()> {
158158 assert ! ( e. value( py) . is_instance(
159159 py. import( "asyncio" ) ?
160160 . getattr( "CancelledError" ) ?
161- . downcast :: <PyType >( )
161+ . cast :: <PyType >( )
162162 . unwrap( )
163163 ) ?) ;
164164 Ok ( ( ) )
@@ -240,7 +240,7 @@ fn test_local_cancel(event_loop: Py<PyAny>) -> PyResult<()> {
240240 assert ! ( e. value( py) . is_instance(
241241 py. import( "asyncio" ) ?
242242 . getattr( "CancelledError" ) ?
243- . downcast :: <PyType >( )
243+ . cast :: <PyType >( )
244244 . unwrap( )
245245 ) ?) ;
246246 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -26,15 +26,8 @@ fn main() -> pyo3::PyResult<()> {
2626 pyo3_async_runtimes:: async_std:: run ( py, async move {
2727 // verify that we are on a uvloop.Loop
2828 Python :: attach ( |py| -> PyResult < ( ) > {
29- assert ! (
30- pyo3_async_runtimes:: async_std:: get_current_loop( py) ?. is_instance(
31- uvloop
32- . bind( py)
33- . getattr( "Loop" ) ?
34- . downcast:: <PyType >( )
35- . unwrap( )
36- ) ?
37- ) ;
29+ assert ! ( pyo3_async_runtimes:: async_std:: get_current_loop( py) ?
30+ . is_instance( uvloop. bind( py) . getattr( "Loop" ) ?. cast:: <PyType >( ) . unwrap( ) ) ?) ;
3831 Ok ( ( ) )
3932 } ) ?;
4033
Original file line number Diff line number Diff line change @@ -35,15 +35,8 @@ fn main() -> pyo3::PyResult<()> {
3535 pyo3_async_runtimes:: tokio:: run ( py, async move {
3636 // verify that we are on a uvloop.Loop
3737 Python :: attach ( |py| -> PyResult < ( ) > {
38- assert ! (
39- pyo3_async_runtimes:: tokio:: get_current_loop( py) ?. is_instance(
40- uvloop
41- . bind( py)
42- . getattr( "Loop" ) ?
43- . downcast:: <PyType >( )
44- . unwrap( )
45- ) ?
46- ) ;
38+ assert ! ( pyo3_async_runtimes:: tokio:: get_current_loop( py) ?
39+ . is_instance( uvloop. bind( py) . getattr( "Loop" ) ?. cast:: <PyType >( ) . unwrap( ) ) ?) ;
4740 Ok ( ( ) )
4841 } ) ?;
4942
Original file line number Diff line number Diff line change @@ -27,15 +27,8 @@ fn main() -> pyo3::PyResult<()> {
2727 pyo3_async_runtimes:: tokio:: run ( py, async move {
2828 // verify that we are on a uvloop.Loop
2929 Python :: attach ( |py| -> PyResult < ( ) > {
30- assert ! (
31- pyo3_async_runtimes:: tokio:: get_current_loop( py) ?. is_instance(
32- uvloop
33- . bind( py)
34- . getattr( "Loop" ) ?
35- . downcast:: <PyType >( )
36- . unwrap( )
37- ) ?
38- ) ;
30+ assert ! ( pyo3_async_runtimes:: tokio:: get_current_loop( py) ?
31+ . is_instance( uvloop. bind( py) . getattr( "Loop" ) ?. cast:: <PyType >( ) . unwrap( ) ) ?) ;
3932 Ok ( ( ) )
4033 } ) ?;
4134
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ async fn test_cancel() -> PyResult<()> {
164164 assert ! ( e. value( py) . is_instance(
165165 py. import( "asyncio" ) ?
166166 . getattr( "CancelledError" ) ?
167- . downcast :: <PyType >( )
167+ . cast :: <PyType >( )
168168 . unwrap( )
169169 ) ?) ;
170170 Ok ( ( ) )
@@ -216,7 +216,7 @@ fn test_local_cancel(event_loop: Py<PyAny>) -> PyResult<()> {
216216 assert ! ( e. value( py) . is_instance(
217217 py. import( "asyncio" ) ?
218218 . getattr( "CancelledError" ) ?
219- . downcast :: <PyType >( )
219+ . cast :: <PyType >( )
220220 . unwrap( )
221221 ) ?) ;
222222 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments