summaryrefslogtreecommitdiff
path: root/tests/test_simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_simple.py')
-rw-r--r--tests/test_simple.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/test_simple.py b/tests/test_simple.py
index 07a0740..2b5252f 100644
--- a/tests/test_simple.py
+++ b/tests/test_simple.py
@@ -126,9 +126,13 @@ class AsnycioTest(unittest.IsolatedAsyncioTestCase):
async def test_copyfd_file_sock(self) -> None:
sock1, sock2 = socket.socketpair()
- with sock1, sock2, linuxnamespaces.FileDescriptor(
- os.open("/etc/passwd", os.O_RDONLY)
- ) as rfd:
+ with (
+ sock1,
+ sock2,
+ linuxnamespaces.FileDescriptor(
+ os.open("/etc/passwd", os.O_RDONLY)
+ ) as rfd,
+ ):
fut = asyncio.ensure_future(
linuxnamespaces.async_copyfd(rfd, sock1.fileno(), 999)
)
@@ -139,9 +143,13 @@ class AsnycioTest(unittest.IsolatedAsyncioTestCase):
async def test_copyfd_file_pipe(self) -> None:
rfdp, wfdp = linuxnamespaces.FileDescriptor.pipe(blocking=False)
- with rfdp, wfdp, linuxnamespaces.FileDescriptor(
- os.open("/etc/passwd", os.O_RDONLY)
- ) as rfd:
+ with (
+ rfdp,
+ wfdp,
+ linuxnamespaces.FileDescriptor(
+ os.open("/etc/passwd", os.O_RDONLY)
+ ) as rfd,
+ ):
fut = asyncio.ensure_future(
linuxnamespaces.async_copyfd(rfd, wfdp, 999)
)