-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose uv_version() for libuv API compatibility (#491)
* Also renamed to have libuv_ namespace
- Loading branch information
Showing
4 changed files
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from uvloop import _testbase as tb | ||
from uvloop.loop import libuv_get_loop_t_ptr, libuv_get_version | ||
|
||
|
||
class Test_UV_libuv(tb.UVTestCase): | ||
def test_libuv_get_loop_t_ptr(self): | ||
loop = self.new_loop() | ||
cap1 = libuv_get_loop_t_ptr(loop) | ||
cap2 = libuv_get_loop_t_ptr(loop) | ||
cap3 = libuv_get_loop_t_ptr(self.new_loop()) | ||
|
||
import pyximport | ||
|
||
pyximport.install() | ||
|
||
from tests import cython_helper | ||
|
||
self.assertTrue(cython_helper.capsule_equals(cap1, cap2)) | ||
self.assertFalse(cython_helper.capsule_equals(cap1, cap3)) | ||
|
||
def test_libuv_get_version(self): | ||
self.assertGreater(libuv_get_version(), 0) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters