File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 75
75
version : " ${{ matrix.mongodb-version }}"
76
76
- name : Run tests
77
77
run : uv run --extra test pytest -v
78
+ - name : Run uvloop test
79
+ run : uv run tools/test_uv_loop.py
78
80
79
81
doctest :
80
82
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change
1
+ # /// script
2
+ # dependencies = [
3
+ # "uvloop>=0.18"
4
+ # ]
5
+ # requires-python = ">=3.11"
6
+ # ///
7
+ from __future__ import annotations
8
+
9
+ import sys
10
+ from pathlib import Path
11
+
12
+ import uvloop
13
+
14
+ # Use pymongo from parent directory.
15
+ root = Path (__file__ ).parent .parent
16
+ sys .path .insert (0 , str (root ))
17
+
18
+ from pymongo import AsyncMongoClient # noqa: E402
19
+
20
+
21
+ async def main ():
22
+ client = AsyncMongoClient ()
23
+ print (await client .admin .command ("ping" ))
24
+
25
+
26
+ uvloop .run (main ())
You can’t perform that action at this time.
0 commit comments