File tree 3 files changed +10
-0
lines changed
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,7 @@ def test_get_uv_loop_t_ptr(self):
16
16
17
17
self .assertTrue (cython_helper .capsule_equals (cap1 , cap2 ))
18
18
self .assertFalse (cython_helper .capsule_equals (cap1 , cap3 ))
19
+
20
+ def test_get_uv_version (self ):
21
+ from uvloop .loop import get_uv_version
22
+ self .assertGreater (get_uv_version (), 0 )
Original file line number Diff line number Diff line change @@ -501,3 +501,5 @@ cdef extern from "uv.h" nogil:
501
501
const uv_process_options_t* options)
502
502
503
503
int uv_process_kill(uv_process_t* handle, int signum)
504
+
505
+ unsigned int uv_version()
Original file line number Diff line number Diff line change @@ -3231,6 +3231,10 @@ cdef class Loop:
3231
3231
return PyCapsule_New(< void * > self .uvloop, NULL , NULL )
3232
3232
3233
3233
3234
+ def get_uv_version (self ):
3235
+ return uv.uv_version()
3236
+
3237
+
3234
3238
cdef void __loop_alloc_buffer(uv.uv_handle_t* uvhandle,
3235
3239
size_t suggested_size,
3236
3240
uv.uv_buf_t* buf) with gil:
You can’t perform that action at this time.
0 commit comments