mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Add cheroot-8.2.1
This commit is contained in:
parent
a2b686f6df
commit
8f6639028f
27 changed files with 7925 additions and 0 deletions
30
lib/cheroot/test/test_errors.py
Normal file
30
lib/cheroot/test/test_errors.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
"""Test suite for ``cheroot.errors``."""
|
||||
|
||||
import pytest
|
||||
|
||||
from cheroot import errors
|
||||
|
||||
from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'err_names,err_nums',
|
||||
(
|
||||
(('', 'some-nonsense-name'), []),
|
||||
(
|
||||
(
|
||||
'EPROTOTYPE', 'EAGAIN', 'EWOULDBLOCK',
|
||||
'WSAEWOULDBLOCK', 'EPIPE',
|
||||
),
|
||||
(91, 11, 32) if IS_LINUX else
|
||||
(32, 35, 41) if IS_MACOS else
|
||||
(32, 10041, 11, 10035) if IS_WINDOWS else
|
||||
(),
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_plat_specific_errors(err_names, err_nums):
|
||||
"""Test that plat_specific_errors retrieves correct err num list."""
|
||||
actual_err_nums = errors.plat_specific_errors(*err_names)
|
||||
assert len(actual_err_nums) == len(err_nums)
|
||||
assert sorted(actual_err_nums) == sorted(err_nums)
|
Loading…
Add table
Add a link
Reference in a new issue