You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/reference/fixtures.rst
+8-8
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
Fixtures
3
3
========
4
4
5
-
``event_loop``
6
-
==============
5
+
event_loop
6
+
==========
7
7
Creates a new asyncio event loop based on the current event loop policy. The new loop
8
8
is available as the return value of this fixture or via `asyncio.get_running_loop <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_running_loop>`__.
9
9
The event loop is closed when the fixture scope ends. The fixture scope defaults
@@ -42,13 +42,13 @@ If you need to change the type of the event loop, prefer setting a custom event
42
42
If the ``pytest.mark.asyncio`` decorator is applied to a test function, the ``event_loop``
43
43
fixture will be requested automatically by the test function.
44
44
45
-
``unused_tcp_port``
46
-
===================
45
+
unused_tcp_port
46
+
===============
47
47
Finds and yields a single unused TCP port on the localhost interface. Useful for
48
48
binding temporary test servers.
49
49
50
-
``unused_tcp_port_factory``
51
-
===========================
50
+
unused_tcp_port_factory
51
+
=======================
52
52
A callable which returns a different unused TCP port each invocation. Useful
53
53
when several unused TCP ports are required in a test.
54
54
@@ -58,6 +58,6 @@ when several unused TCP ports are required in a test.
0 commit comments