Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–10 unchanged (10 lines)
11)
12from tests.utils.decorators import coroutine_test
13
14
15class TestAsyncio:
16 @pytest.mark.requires_reactor
17 def test_is_asyncio_reactor_installed(self, reactor_pytest: str) -> None:
18 # the result should depend only on the pytest --reactor argument
19 assert is_asyncio_reactor_installed() == (reactor_pytest == "asyncio")
20
21 @pytest.mark.requires_reactor
22 def test_install_asyncio_reactor(self):
23 from twisted.internet import reactor as original_reactor
24
25 with warnings.catch_warnings(record=True) as w:
26 install_reactor(_asyncio_reactor_path)
27 assert len(w) == 0, [str(warning) for warning in w]
28 from twisted.internet import reactor # pylint: disable=reimported
29
30 assert original_reactor == reactor
31
32 @pytest.mark.requires_reactor
33 @pytest.mark.only_asyncio
34 @coroutine_test
35 async def test_set_asyncio_event_loop(self):
36 install_reactor(_asyncio_reactor_path)
37 assert set_asyncio_event_loop(None) is asyncio.get_running_loop()
38

After

…lines 1–9 unchanged (9 lines)
10 set_asyncio_event_loop,
11)
12from tests.utils.decorators import coroutine_test
13
14
15class TestAsyncio:
16 @pytest.mark.requires_reactor # needs a reactor
17 def test_is_asyncio_reactor_installed(self, reactor_pytest: str) -> None:
18 # the result should depend only on the pytest --reactor argument
19 assert is_asyncio_reactor_installed() == (reactor_pytest == "asyncio")
20
21 @pytest.mark.requires_reactor # installs a reactor
22 def test_install_asyncio_reactor(self):
23 from twisted.internet import reactor as original_reactor
24
25 with warnings.catch_warnings(record=True) as w:
26 install_reactor(_asyncio_reactor_path)
27 assert len(w) == 0, [str(warning) for warning in w]
28 from twisted.internet import reactor # pylint: disable=reimported
29
30 assert original_reactor == reactor
31
32 @pytest.mark.requires_reactor # installs a reactor
33 @pytest.mark.only_asyncio
34 @coroutine_test
35 async def test_set_asyncio_event_loop(self):
36 install_reactor(_asyncio_reactor_path)
37 assert set_asyncio_event_loop(None) is asyncio.get_running_loop()
38

Before

module
import_statement
import "import"
dotted_name
identifier "asyncio"
import_statement
import "import"
dotted_name
identifier "warnings"
import_statement
import "import"
dotted_name
identifier "pytest"
import_from_statement (+23 nodes collapsed)
import_from_statement
from "from"
dotted_name
identifier "tests"
. "."
identifier "utils"
. "."
identifier "decorators"
import "import"
dotted_name
identifier "coroutine_test"
class_definition
class "class"
identifier "TestAsyncio"
: ":"
block
decorated_definition
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "requires_reactor"
function_definition (+38 nodes collapsed)
decorated_definition
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "requires_reactor"
function_definition (+92 nodes collapsed)
decorated_definition
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "requires_reactor"
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "only_asyncio"
decorator
@ "@"
identifier "coroutine_test"
function_definition (+35 nodes collapsed)

After

module
import_statement
import "import"
dotted_name
identifier "asyncio"
import_statement
import "import"
dotted_name
identifier "warnings"
import_statement
import "import"
dotted_name
identifier "pytest"
import_from_statement (+23 nodes collapsed)
import_from_statement
from "from"
dotted_name
identifier "tests"
. "."
identifier "utils"
. "."
identifier "decorators"
import "import"
dotted_name
identifier "coroutine_test"
class_definition
class "class"
identifier "TestAsyncio"
: ":"
block
decorated_definition
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "requires_reactor"
comment "# needs a reactor"
function_definition (+38 nodes collapsed)
decorated_definition
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "requires_reactor"
comment "# installs a reactor"
function_definition (+92 nodes collapsed)
decorated_definition
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "requires_reactor"
comment "# installs a reactor"
decorator
@ "@"
attribute
attribute
identifier "pytest"
. "."
identifier "mark"
. "."
identifier "only_asyncio"
decorator
@ "@"
identifier "coroutine_test"
function_definition (+35 nodes collapsed)