Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure to collect all wasyncore tests #367

Merged
merged 1 commit into from Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
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
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