Blob Blame History Raw
From 57069265e08be06fbaee9903bd0d78d759f8a3da Mon Sep 17 00:00:00 2001
From: Chris Seymour <christopher.seymour@nanoporetech.com>
Date: Sat, 30 Jun 2018 14:25:00 +0100
Subject: [PATCH 07/11] decorate tests with asyncio.coroutine

---
 tests/test_os.py     | 3 +++
 tests/test_simple.py | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/tests/test_os.py b/tests/test_os.py
index 6b1cb5f..9fa0722 100644
--- a/tests/test_os.py
+++ b/tests/test_os.py
@@ -6,6 +6,7 @@ import pytest
 import platform
 
 
+@asyncio.coroutine
 @pytest.mark.asyncio
 def test_stat():
     """Test the stat call."""
@@ -16,6 +17,7 @@ def test_stat():
     assert stat_res.st_size == 10
 
 
+@asyncio.coroutine
 @pytest.mark.skipif('2.4' < platform.release() < '2.6.33',
                     reason = "sendfile() syscall doesn't allow file->file")
 @pytest.mark.asyncio
@@ -46,6 +48,7 @@ def test_sendfile_file(tmpdir):
     assert size == actual_size
 
 
+@asyncio.coroutine
 @pytest.mark.asyncio
 def test_sendfile_socket(unused_tcp_port):
     """Test the sendfile functionality, file-to-socket."""
diff --git a/tests/test_simple.py b/tests/test_simple.py
index a301d0a..e0f95b4 100644
--- a/tests/test_simple.py
+++ b/tests/test_simple.py
@@ -4,6 +4,7 @@ from aiofiles import threadpool
 import pytest
 
 
+@asyncio.coroutine
 @pytest.mark.asyncio
 def test_serve_small_bin_file_sync(event_loop, tmpdir, unused_tcp_port):
     """Fire up a small simple file server, and fetch a file.
@@ -38,6 +39,7 @@ def test_serve_small_bin_file_sync(event_loop, tmpdir, unused_tcp_port):
     yield from server.wait_closed()
 
 
+@asyncio.coroutine
 @pytest.mark.asyncio
 def test_serve_small_bin_file(event_loop, tmpdir, unused_tcp_port):
     """Fire up a small simple file server, and fetch a file."""
-- 
2.18.0.rc2