Skip to content

Commit

Permalink
Make sure to collect all wasyncore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalresistor committed Mar 13, 2022
1 parent c87c899 commit dc15d9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ docs =
[tool:pytest]
python_files = test_*.py
# For the benefit of test_wasyncore.py
python_classes = Test_*
python_classes = Test*
testpaths =
tests
addopts = --cov -W always
18 changes: 9 additions & 9 deletions tests/test_wasyncore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,19 +1140,19 @@ def test_quick_connect(self): # pragma: no cover
join_thread(t, timeout=TIMEOUT)


class TestAPI_UseIPv4Sockets(BaseTestAPI):
class BaseTestAPI_UseIPv4Sockets(BaseTestAPI):
family = socket.AF_INET
addr = (HOST, 0)


@unittest.skipUnless(IPV6_ENABLED, "IPv6 support required")
class TestAPI_UseIPv6Sockets(BaseTestAPI):
class BaseTestAPI_UseIPv6Sockets(BaseTestAPI):
family = socket.AF_INET6
addr = (HOSTv6, 0)


@unittest.skipUnless(HAS_UNIX_SOCKETS, "Unix sockets required")
class TestAPI_UseUnixSockets(BaseTestAPI):
class BaseTestAPI_UseUnixSockets(BaseTestAPI):
if HAS_UNIX_SOCKETS:
family = socket.AF_UNIX
addr = TESTFN
Expand All @@ -1162,30 +1162,30 @@ def tearDown(self):
BaseTestAPI.tearDown(self)


class TestAPI_UseIPv4Select(TestAPI_UseIPv4Sockets, unittest.TestCase):
class TestAPI_UseIPv4Select(BaseTestAPI_UseIPv4Sockets, unittest.TestCase):
use_poll = False


@unittest.skipUnless(hasattr(select, "poll"), "select.poll required")
class TestAPI_UseIPv4Poll(TestAPI_UseIPv4Sockets, unittest.TestCase):
class TestAPI_UseIPv4Poll(BaseTestAPI_UseIPv6Sockets, unittest.TestCase):
use_poll = True


class TestAPI_UseIPv6Select(TestAPI_UseIPv6Sockets, unittest.TestCase):
class TestAPI_UseIPv6Select(BaseTestAPI_UseIPv6Sockets, unittest.TestCase):
use_poll = False


@unittest.skipUnless(hasattr(select, "poll"), "select.poll required")
class TestAPI_UseIPv6Poll(TestAPI_UseIPv6Sockets, unittest.TestCase):
class TestAPI_UseIPv6Poll(BaseTestAPI_UseIPv6Sockets, unittest.TestCase):
use_poll = True


class TestAPI_UseUnixSocketsSelect(TestAPI_UseUnixSockets, unittest.TestCase):
class TestAPI_UseUnixSocketsSelect(BaseTestAPI_UseUnixSockets, unittest.TestCase):
use_poll = False


@unittest.skipUnless(hasattr(select, "poll"), "select.poll required")
class TestAPI_UseUnixSocketsPoll(TestAPI_UseUnixSockets, unittest.TestCase):
class TestAPI_UseUnixSocketsPoll(BaseTestAPI_UseUnixSockets, unittest.TestCase):
use_poll = True


Expand Down

0 comments on commit dc15d9f

Please sign in to comment.