From 8079ed7a009e1eb43efec38579d67e5d850ab0f4 Mon Sep 17 00:00:00 2001 From: Alan Briolat Date: Mon, 14 Feb 2022 21:20:52 +0000 Subject: [PATCH] tests: remove redundant uses of @pytest.mark.asyncio, fix some old yield-style tests that were being ignored --- tests/conftest.py | 1 - tests/test_bot.py | 6 ------ tests/test_events.py | 19 ++++++++----------- tests/test_irc.py | 17 ----------------- tests/test_plugin_github.py | 1 - tests/test_plugin_imgur.py | 3 --- tests/test_plugin_linkinfo.py | 14 +++----------- tests/test_plugin_usertrack.py | 1 - tests/test_plugin_whois.py | 1 - tests/test_plugin_xkcd.py | 8 -------- tests/test_plugin_youtube.py | 2 -- tests/test_util.py | 14 -------------- 12 files changed, 11 insertions(+), 76 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 9066f263..97907c96 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -149,7 +149,6 @@ async def run_client(event_loop, irc_client_helper): point it should yield control to allow the client to progress. >>> @pytest.mark.usefixtures("run_client") - ... @pytest.mark.asyncio ... async def test_something(irc_client_helper): ... await irc_client_helper.receive_bytes(b":nick!user@host PRIVMSG #channel :hello\r\n") ... irc_client_helper.assert_sent('PRIVMSG #channel :what do you mean, hello?') diff --git a/tests/test_bot.py b/tests/test_bot.py index 147dc359..875c7a8e 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -103,7 +103,6 @@ def quit(self, event): pytestmark = pytest.mark.bot(plugins=[MockPlugin], config=CONFIG) - @pytest.mark.asyncio async def test_hooks(self, bot_helper): """Check that hooks fire in the expected way.""" bot = bot_helper.bot @@ -136,7 +135,6 @@ async def test_hooks(self, bot_helper): mock.call('test3', {}), ] - @pytest.mark.asyncio @pytest.mark.parametrize('n', list(range(1, 10))) async def test_burst_in_order(self, bot_helper, n): """Check that a plugin always gets messages in receive order.""" @@ -146,7 +144,6 @@ async def test_burst_in_order(self, bot_helper, n): await asyncio.wait(bot_helper.receive(messages)) assert plugin.handler_mock.mock_calls == [mock.call('quit', user) for user in users] - @pytest.mark.asyncio async def test_non_blocking(self, bot_helper): """Check that long-running hooks don't block other events from being processed.""" plugin = bot_helper['mockplugin'] @@ -195,7 +192,6 @@ def command_cd(self, *args, **kwargs): """ @pytest.mark.bot(plugins=[MockPlugin1], config=CONFIG_A) - @pytest.mark.asyncio async def test_command_help(self, bot_helper): """Check that commands fire in the expected way.""" await asyncio.wait(bot_helper.receive([':nick!user@host PRIVMSG #channel :&plugins'])) @@ -214,7 +210,6 @@ async def test_command_help(self, bot_helper): bot_helper.assert_sent('NOTICE #channel :This command has help') @pytest.mark.bot(plugins=[MockPlugin1], config=CONFIG_A) - @pytest.mark.asyncio async def test_command_fired(self, bot_helper): """Check that commands fire in the expected way.""" plugin = bot_helper['mockplugin1'] @@ -255,7 +250,6 @@ def command_a(self, *args, **kwargs): """ @pytest.mark.bot(plugins=[MockPlugin1, MockPlugin2], config=CONFIG_B) - @pytest.mark.asyncio async def test_command_single_handler(self, caplog, bot_helper): count = 0 for r in caplog.get_records("setup"): diff --git a/tests/test_events.py b/tests/test_events.py index fd273604..dae027d3 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -123,20 +123,18 @@ def handle_event(event): class TestAsyncEventRunner: - @pytest.mark.asyncio - def test_values(self, async_runner): + async def test_values(self, async_runner): """Check that basic values are passed through the event queue unmolested.""" # Test that things actually get through - yield from async_runner.runner.post_event('foo') + await async_runner.runner.post_event('foo') assert async_runner.handle_event.call_args_list == [mock.call('foo')] # The event runner doesn't care what it's passing through for x in ['bar', 1.3, None, object]: - yield from async_runner.runner.post_event(x) + await async_runner.runner.post_event(x) assert async_runner.handle_event.call_args[0][0] is x - @pytest.mark.asyncio - def test_event_chain(self, async_runner): + async def test_event_chain(self, async_runner): """Check that chains of events get handled.""" async def f1(): async_runner.runner.post_event(f2) @@ -147,12 +145,12 @@ async def f2(): async def f3(): pass - yield from async_runner.runner.post_event(f1) + await async_runner.runner.post_event(f1) assert async_runner.handle_event.call_count == 3 async_runner.handle_event.assert_has_calls([mock.call(f1), mock.call(f2), mock.call(f3)]) @pytest.mark.asyncio(allow_unhandled_exception=True) - def test_exception_recovery(self, async_runner): + async def test_exception_recovery(self, async_runner): """Check that exceptions are handled but don't block other tasks or leave the runner in a broken state. """ @@ -170,17 +168,16 @@ async def f4(): pass assert async_runner.exception_handler.call_count == 0 - yield from async_runner.runner.post_event(f1) + await async_runner.runner.post_event(f1) assert async_runner.exception_handler.call_count == 1 async_runner.handle_event.assert_has_calls([mock.call(f1), mock.call(f2)]) # self.assertEqual(set(self.handled_events), {f1, f2}) - yield from async_runner.runner.post_event(f3) + await async_runner.runner.post_event(f3) assert async_runner.exception_handler.call_count == 1 async_runner.handle_event.assert_has_calls([mock.call(f1), mock.call(f2), mock.call(f3), mock.call(f4)]) # self.assertEqual(set(self.handled_events), {f1, f2, f3, f4}) -@pytest.mark.asyncio class TestHybridEventRunner: class EventHandler: def __init__(self): diff --git a/tests/test_irc.py b/tests/test_irc.py index baba25e1..950bbb04 100644 --- a/tests/test_irc.py +++ b/tests/test_irc.py @@ -9,7 +9,6 @@ # Test IRC client line protocol -@pytest.mark.asyncio async def test_buffer(run_client): """Check that incoming data is converted to a line-oriented protocol.""" with run_client.patch('line_received') as m: @@ -34,7 +33,6 @@ async def test_buffer(run_client): ]) -@pytest.mark.asyncio async def test_decode_ascii(run_client): """Check that plain ASCII ends up as a (unicode) string.""" with run_client.patch('line_received') as m: @@ -42,7 +40,6 @@ async def test_decode_ascii(run_client): m.assert_called_once_with(':nick!user@host PRIVMSG #channel :hello') -@pytest.mark.asyncio async def test_decode_utf8(run_client): """Check that incoming UTF-8 is properly decoded.""" with run_client.patch('line_received') as m: @@ -50,7 +47,6 @@ async def test_decode_utf8(run_client): m.assert_called_once_with(':nick!user@host PRIVMSG #channel :ಠ') -@pytest.mark.asyncio async def test_decode_cp1252(run_client): """Check that incoming CP1252 is properly decoded. @@ -62,7 +58,6 @@ async def test_decode_cp1252(run_client): m.assert_called_once_with(':nick!user@host PRIVMSG #channel :“”') -@pytest.mark.asyncio async def test_decode_invalid_sequence(run_client): """Check that incoming invalid byte sequence is properly handled. @@ -91,7 +86,6 @@ def test_truncate(irc_client_helper): # Test IRC client behaviour -@pytest.mark.asyncio async def test_auto_reconnect_eof(run_client): with mock_open_connection_paused() as m: assert not m.called @@ -105,7 +99,6 @@ async def test_auto_reconnect_eof(run_client): m.assert_called_once() -@pytest.mark.asyncio async def test_auto_reconnect_exception(run_client): with mock_open_connection_paused() as m: assert not m.called @@ -119,7 +112,6 @@ async def test_auto_reconnect_exception(run_client): m.assert_called_once() -@pytest.mark.asyncio async def test_disconnect(run_client): with mock_open_connection() as m: assert not m.called @@ -141,7 +133,6 @@ def irc_client_config(self): 'rate_limit_count': 2, } - @pytest.mark.asyncio async def test_rate_limit_applied(self, fast_forward, run_client): # Make sure startup messages don't contribute to the test await fast_forward(10) @@ -160,7 +151,6 @@ async def test_rate_limit_applied(self, fast_forward, run_client): run_client.assert_bytes_sent(b"PRIVMSG #channel :3\r\n" b"PRIVMSG #channel :4\r\n") - @pytest.mark.asyncio async def test_cancel_on_disconnect(self, fast_forward, run_client): with mock_open_connection_paused() as m: # Make sure startup messages don't contribute to the test @@ -197,7 +187,6 @@ def irc_client_config(self): 'client_ping_interval': 3, } - @pytest.mark.asyncio async def test_client_PING(self, fast_forward, run_client): """Check that client PING commands are sent at the expected interval.""" run_client.reset_mock() @@ -228,7 +217,6 @@ async def test_client_PING(self, fast_forward, run_client): mock.call('PING 5'), ] - @pytest.mark.asyncio async def test_client_PING_only_when_needed(self, fast_forward, run_client): """Check that client PING commands are sent relative to the last received message.""" run_client.reset_mock() @@ -408,7 +396,6 @@ def test_parse_failure(irc_client_helper): irc_client_helper.receive('') -@pytest.mark.asyncio async def test_wait_for_success(irc_client_helper): messages = [ IRCMessage(None, 'PING', ['0'], 'PING', 'PING :0'), @@ -444,7 +431,6 @@ async def test_wait_for_success(irc_client_helper): ] -@pytest.mark.asyncio async def test_wait_for_cancelled(irc_client_helper): messages = [ IRCMessage(None, 'PING', ['0'], 'PING', 'PING :0'), @@ -469,7 +455,6 @@ async def test_wait_for_cancelled(irc_client_helper): ] -@pytest.mark.asyncio async def test_wait_for_exception(irc_client_helper): messages = [ IRCMessage(None, 'PING', ['0'], 'PING', 'PING :0'), @@ -523,7 +508,6 @@ def test_quit(irc_client_helper): irc_client_helper.assert_sent('QUIT :reason') -@pytest.mark.asyncio async def test_quit_no_reconnect(run_client): with run_client.patch('connect') as m: run_client.client.quit(reconnect=False) @@ -532,7 +516,6 @@ async def test_quit_no_reconnect(run_client): assert not m.called -@pytest.mark.asyncio async def test_quit_reconnect(run_client): with run_client.patch('connect') as m: run_client.client.quit(reconnect=True) diff --git a/tests/test_plugin_github.py b/tests/test_plugin_github.py index a166e487..f0e1ceb7 100644 --- a/tests/test_plugin_github.py +++ b/tests/test_plugin_github.py @@ -200,7 +200,6 @@ class TestGitHubPlugin: @pytest.mark.parametrize("fixture_file, expected", TEST_CASES) @pytest.mark.usefixtures("run_client") - @pytest.mark.asyncio async def test_behaviour(self, bot_helper, client, fixture_file, expected): payload, headers = bot_helper.payload_and_headers_from_fixture(fixture_file) resp = await client.post(self.URL, data=payload, headers=headers) diff --git a/tests/test_plugin_imgur.py b/tests/test_plugin_imgur.py index 18cc3f85..72862db9 100644 --- a/tests/test_plugin_imgur.py +++ b/tests/test_plugin_imgur.py @@ -164,7 +164,6 @@ """) -@pytest.mark.asyncio @pytest.mark.parametrize("url, api_url, status, content_type, fixture, title", test_cases) async def test_integration(bot_helper, aioresponses, url, api_url, status, content_type, fixture, title): aioresponses.get(api_url, status=status, @@ -178,7 +177,6 @@ async def test_integration(bot_helper, aioresponses, url, api_url, status, conte assert title == result.text -@pytest.mark.asyncio @pytest.mark.parametrize("url, api_url, status, content_type, fixture, title", nsfw_test_cases) async def test_integration_nsfw(bot_helper, aioresponses, url, api_url, status, content_type, fixture, title): aioresponses.get(api_url, status=status, @@ -192,7 +190,6 @@ async def test_integration_nsfw(bot_helper, aioresponses, url, api_url, status, assert title == result.text -@pytest.mark.asyncio async def test_invalid_URL(bot_helper, aioresponses): """Test that an unrecognised URL never even results in a request.""" result = await bot_helper['linkinfo'].get_link_info('http://imgur.com/invalid/url') diff --git a/tests/test_plugin_linkinfo.py b/tests/test_plugin_linkinfo.py index d7726fab..94a256db 100644 --- a/tests/test_plugin_linkinfo.py +++ b/tests/test_plugin_linkinfo.py @@ -141,7 +141,6 @@ async def irc_client(irc_client): return irc_client -@pytest.mark.asyncio @pytest.mark.parametrize("url, content_type, body, expected_title", encoding_test_cases, ids=[_[0] for _ in encoding_test_cases]) async def test_encoding_handling(bot_helper, aioresponses, url, content_type, body, expected_title): @@ -150,7 +149,6 @@ async def test_encoding_handling(bot_helper, aioresponses, url, content_type, bo assert result.text == expected_title -@pytest.mark.asyncio @pytest.mark.parametrize("url, content_type, body", error_test_cases, ids=[_[0] for _ in error_test_cases]) async def test_html_title_errors(bot_helper, aioresponses, url, content_type, body): @@ -159,7 +157,6 @@ async def test_html_title_errors(bot_helper, aioresponses, url, content_type, bo assert result.is_error -@pytest.mark.asyncio async def test_not_found(bot_helper, aioresponses): # Test our assumptions: direct request should raise connection error, because aioresponses # is mocking the internet @@ -172,7 +169,6 @@ async def test_not_found(bot_helper, aioresponses): assert result.is_error -@pytest.mark.asyncio @pytest.mark.parametrize("msg, urls", [('http://example.com', ['http://example.com'])]) async def test_scan_privmsg(event_loop, bot_helper, aioresponses, msg, urls): with asynctest.mock.patch.object(bot_helper['linkinfo'], 'get_link_info') as get_link_info: @@ -180,7 +176,6 @@ async def test_scan_privmsg(event_loop, bot_helper, aioresponses, msg, urls): get_link_info.assert_has_calls([mock.call(url) for url in urls]) -@pytest.mark.asyncio @pytest.mark.parametrize("msg, urls", [('http://example.com', ['http://example.com'])]) async def test_command(event_loop, bot_helper, aioresponses, msg, urls): with asynctest.mock.patch.object(bot_helper['linkinfo'], 'get_link_info') as get_link_info, \ @@ -191,8 +186,7 @@ async def test_command(event_loop, bot_helper, aioresponses, msg, urls): assert link_command.call_count == 1 -@pytest.mark.asyncio -def test_scan_privmsg_rate_limit(bot_helper, aioresponses): +async def test_scan_privmsg_rate_limit(bot_helper, aioresponses): """Test that we won't respond too frequently to URLs in messages. Unfortunately we can't currently test the passage of time, so the only @@ -203,11 +197,11 @@ def test_scan_privmsg_rate_limit(bot_helper, aioresponses): count = linkinfo.config.rate_limit_count for i in range(count): with asynctest.mock.patch.object(linkinfo, 'get_link_info', ) as get_link_info: - yield from bot_helper.client.line_received( + await bot_helper.client.line_received( ':nick!user@host PRIVMSG #channel :http://example.com/{}'.format(i)) get_link_info.assert_called_once_with('http://example.com/{}'.format(i)) with asynctest.mock.patch.object(linkinfo, 'get_link_info') as get_link_info: - yield from bot_helper.client.line_received(':nick!user@host PRIVMSG #channel :http://example.com/12345') + await bot_helper.client.line_received(':nick!user@host PRIVMSG #channel :http://example.com/12345') assert not get_link_info.called @@ -228,7 +222,6 @@ def privmsg(self, event): pytestmark = pytest.mark.bot(plugins=find_plugins() + [MockPlugin], config=CONFIG) - @pytest.mark.asyncio async def test_non_blocking_privmsg(self, event_loop, bot_helper, aioresponses): bot_helper.reset_mock() @@ -260,7 +253,6 @@ async def handler(url, **kwargs): mock.call('NOTICE #channel :foo'), ]) - @pytest.mark.asyncio async def test_non_blocking_command(self, event_loop, bot_helper, aioresponses): bot_helper.reset_mock() diff --git a/tests/test_plugin_usertrack.py b/tests/test_plugin_usertrack.py index 29d2554a..8ec72845 100644 --- a/tests/test_plugin_usertrack.py +++ b/tests/test_plugin_usertrack.py @@ -25,7 +25,6 @@ def assert_account(self, nick, account): plugins = ["usertrack"] """), pytest.mark.usefixtures("run_client"), - pytest.mark.asyncio, ] diff --git a/tests/test_plugin_whois.py b/tests/test_plugin_whois.py index 59f3f261..27457a9d 100644 --- a/tests/test_plugin_whois.py +++ b/tests/test_plugin_whois.py @@ -95,7 +95,6 @@ def test_whois_setdefault_unset(self, whois): @pytest.mark.usefixtures("run_client") -@pytest.mark.asyncio class TestWhoisBehaviour: async def test_client_reply_whois_after_set(self, bot_helper): await bot_helper.recv_privmsg('Nick!~user@host', '#First', '!whois.set test1') diff --git a/tests/test_plugin_xkcd.py b/tests/test_plugin_xkcd.py index 423f122d..e335b660 100644 --- a/tests/test_plugin_xkcd.py +++ b/tests/test_plugin_xkcd.py @@ -94,7 +94,6 @@ def populate_responses(self, bot_helper, aioresponses): aioresponses.add(url, body=read_fixture_file(fixture), content_type=content_type) - @pytest.mark.asyncio @pytest.mark.usefixtures("populate_responses") @pytest.mark.parametrize("num, url, content_type, fixture, expected", json_test_cases, ids=[_[1] for _ in json_test_cases]) @@ -102,14 +101,12 @@ async def test_correct(self, bot_helper, num, url, content_type, fixture, expect result = await bot_helper['xkcd']._xkcd(num) assert result == expected - @pytest.mark.asyncio @pytest.mark.usefixtures("populate_responses") async def test_latest_success(self, bot_helper): # Also test the empty string num, url, content_type, fixture, expected = json_test_cases[0] assert await bot_helper['xkcd']._xkcd("") == expected - @pytest.mark.asyncio @pytest.mark.usefixtures("populate_responses") async def test_random(self, bot_helper): # !xkcd 221 @@ -117,7 +114,6 @@ async def test_random(self, bot_helper): with patch("random.randint", return_value=1): assert await bot_helper['xkcd']._xkcd("rand") == expected - @pytest.mark.asyncio async def test_error_1(self, bot_helper, aioresponses): num, url, content_type, fixture, _ = json_test_cases[0] # Latest # Test if the comics are unavailable by making the latest return a 404 @@ -126,7 +122,6 @@ async def test_error_1(self, bot_helper, aioresponses): with pytest.raises(bot_helper['xkcd'].XKCDError): await bot_helper['xkcd']._xkcd("") - @pytest.mark.asyncio async def test_error_2(self, bot_helper, aioresponses): num, url, content_type, fixture, _ = json_test_cases[0] # Latest # Now override the actual 404 page and the latest "properly" @@ -162,7 +157,6 @@ def populate_responses(self, bot_helper, aioresponses): content_type=content_type) @pytest.mark.usefixtures("populate_responses") - @pytest.mark.asyncio @pytest.mark.parametrize("num, url, content_type, fixture, expected", json_test_cases, ids=[_[1] for _ in json_test_cases]) async def test_integration(self, bot_helper, num, url, content_type, fixture, expected): @@ -173,7 +167,6 @@ async def test_integration(self, bot_helper, num, url, content_type, fixture, ex assert alt in result.text @pytest.mark.usefixtures("populate_responses") - @pytest.mark.asyncio @pytest.mark.parametrize("num, url, content_type, fixture, expected", json_test_cases, ids=[_[1] for _ in json_test_cases]) async def test_command(self, bot_helper, num, url, content_type, fixture, expected): @@ -185,7 +178,6 @@ async def test_command(self, bot_helper, num, url, content_type, fixture, expect assert alt in outgoing @pytest.mark.usefixtures("populate_responses") - @pytest.mark.asyncio async def test_integration_error(self, bot_helper): # Error case result = await bot_helper['linkinfo'].get_link_info("http://xkcd.com/flibble") diff --git a/tests/test_plugin_youtube.py b/tests/test_plugin_youtube.py index d51c87f5..68c99baa 100644 --- a/tests/test_plugin_youtube.py +++ b/tests/test_plugin_youtube.py @@ -94,7 +94,6 @@ def pre_irc_client(aioresponses): api_key = "abc" """) class TestYoutubePlugin: - @pytest.mark.asyncio @pytest.mark.parametrize("vid_id, status, fixture, expected", json_test_cases) async def test_ids(self, bot_helper, aioresponses, vid_id, status, fixture, expected): pattern = re.compile(rf'https://www.googleapis.com/youtube/v3/videos\?.*\bid={vid_id}\b.*') @@ -127,7 +126,6 @@ def bot_helper(self, bot_helper): }) return bot_helper - @pytest.mark.asyncio @pytest.mark.parametrize("vid_id, status, fixture, response", json_test_cases) @pytest.mark.parametrize("url", [ "https://www.youtube.com/watch?v={}", diff --git a/tests/test_util.py b/tests/test_util.py index a82db63d..d4bf6110 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -6,12 +6,10 @@ from csbot import util -@pytest.mark.asyncio async def test_maybe_future_none(): assert util.maybe_future(None) is None -@pytest.mark.asyncio async def test_maybe_future_non_awaitable(): on_error = mock.Mock(spec=callable) assert util.maybe_future("foo", on_error=on_error) is None @@ -20,7 +18,6 @@ async def test_maybe_future_non_awaitable(): ] -@pytest.mark.asyncio async def test_maybe_future_coroutine(): async def foo(): await asyncio.sleep(0) @@ -34,13 +31,11 @@ async def foo(): assert future.exception() is None -@pytest.mark.asyncio async def test_maybe_future_result_none(): result = await util.maybe_future_result(None) assert result is None -@pytest.mark.asyncio async def test_maybe_future_result_non_awaitable(): on_error = mock.Mock(spec=callable) result = await util.maybe_future_result("foo", on_error=on_error) @@ -50,7 +45,6 @@ async def test_maybe_future_result_non_awaitable(): ] -@pytest.mark.asyncio async def test_maybe_future_result_coroutine(): async def foo(): await asyncio.sleep(0) @@ -71,7 +65,6 @@ def test_truncate_utf8(): # @pytest.mark.skip class TestRateLimited: - @pytest.mark.asyncio async def test_bursts(self, event_loop, fast_forward): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds @@ -98,7 +91,6 @@ async def test_bursts(self, event_loop, fast_forward): rl.stop() - @pytest.mark.asyncio async def test_constant_rate(self, event_loop, fast_forward): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds @@ -129,7 +121,6 @@ async def test_constant_rate(self, event_loop, fast_forward): rl.stop() - @pytest.mark.asyncio async def test_restart_with_clear(self, event_loop, fast_forward): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds @@ -168,7 +159,6 @@ async def test_restart_with_clear(self, event_loop, fast_forward): rl.stop() - @pytest.mark.asyncio async def test_restart_without_clear(self, event_loop, fast_forward): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds @@ -211,7 +201,6 @@ async def test_restart_without_clear(self, event_loop, fast_forward): rl.stop() - @pytest.mark.asyncio async def test_call_before_start(self, event_loop, fast_forward): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds @@ -230,7 +219,6 @@ async def test_call_before_start(self, event_loop, fast_forward): rl.stop() - @pytest.mark.asyncio async def test_exception(self, event_loop, fast_forward): f = mock.Mock(spec=callable, side_effect=Exception("fail")) # Test with 2 calls per 2 seconds @@ -244,7 +232,6 @@ async def test_exception(self, event_loop, fast_forward): rl.stop() - @pytest.mark.asyncio async def test_start_stop(self, event_loop): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds @@ -260,7 +247,6 @@ async def test_start_stop(self, event_loop): rl.stop() - @pytest.mark.asyncio async def test_stop_returns_cancelled_calls(self, event_loop): f = mock.Mock(spec=callable) # Test with 2 calls per 2 seconds