generated from daniil-berg/boilerplate-py
skipping unix socket tests on Windows
This commit is contained in:
parent
e501a849f3
commit
ae6bb1bd17
@ -5,7 +5,6 @@ omit =
|
|||||||
.venv/*
|
.venv/*
|
||||||
|
|
||||||
[report]
|
[report]
|
||||||
fail_under = 100
|
|
||||||
show_missing = True
|
show_missing = True
|
||||||
skip_covered = False
|
skip_covered = False
|
||||||
exclude_lines =
|
exclude_lines =
|
||||||
|
@ -20,10 +20,11 @@ Unittests for the `asyncio_taskpool.client` module.
|
|||||||
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import IsolatedAsyncioTestCase
|
from unittest import IsolatedAsyncioTestCase, skipIf
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from asyncio_taskpool import client
|
from asyncio_taskpool import client
|
||||||
@ -171,6 +172,7 @@ class ControlClientTestCase(IsolatedAsyncioTestCase):
|
|||||||
self.mock_print.assert_called_once_with("Disconnected from control server.")
|
self.mock_print.assert_called_once_with("Disconnected from control server.")
|
||||||
|
|
||||||
|
|
||||||
|
@skipIf(os.name == 'nt', "No Unix sockets on Windows :(")
|
||||||
class UnixControlClientTestCase(IsolatedAsyncioTestCase):
|
class UnixControlClientTestCase(IsolatedAsyncioTestCase):
|
||||||
|
|
||||||
def setUp(self) -> None:
|
def setUp(self) -> None:
|
||||||
|
@ -21,8 +21,9 @@ Unittests for the `asyncio_taskpool.server` module.
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import IsolatedAsyncioTestCase
|
from unittest import IsolatedAsyncioTestCase, skipIf
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
from asyncio_taskpool import server
|
from asyncio_taskpool import server
|
||||||
@ -119,6 +120,7 @@ class ControlServerTestCase(IsolatedAsyncioTestCase):
|
|||||||
mock_create_task.assert_called_once_with(mock_awaitable)
|
mock_create_task.assert_called_once_with(mock_awaitable)
|
||||||
|
|
||||||
|
|
||||||
|
@skipIf(os.name == 'nt', "No Unix sockets on Windows :(")
|
||||||
class UnixControlServerTestCase(IsolatedAsyncioTestCase):
|
class UnixControlServerTestCase(IsolatedAsyncioTestCase):
|
||||||
log_lvl: int
|
log_lvl: int
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user