Skip to content

Commit b89ba76

Browse files
committed
tests/tcp: Fix test skipping logic
1 parent 1ecfe5b commit b89ba76

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_tcp.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import socket
3+
import unittest
34
import uvloop
45
import sys
56

@@ -188,11 +189,13 @@ async def runner():
188189

189190
def test_create_server_6(self):
190191
if not hasattr(socket, 'SO_REUSEPORT'):
191-
return unittest.skip('The system does not support SO_REUSEPORT')
192+
raise unittest.SkipTest(
193+
'The system does not support SO_REUSEPORT')
192194

193195
if sys.version_info[:3] < (3, 5, 1):
194-
return unittest.skip('asyncio in CPython 3.5.0 does not have the '
195-
'reuse_port argument')
196+
raise unittest.SkipTest(
197+
'asyncio in CPython 3.5.0 does not have the '
198+
'reuse_port argument')
196199

197200
port = tb.find_free_port()
198201

0 commit comments

Comments
 (0)