Closed
Description
As noted in #68, I'm working on/trying to package pytest-socket
for my OS's repositories. In doing so, I opened #69, but I'm also noticing that tests seem to be failing out of the box on the downloaded archive. Here are the steps I took:
- download and extract the (currently released) archive from GitHub (not PyPI, because those don't include the tests--see Include tests in PyPI tarball #68):
curl -L https://github.com/miketheman/pytest-socket/archive/refs/tags/0.4.0.tar.gz | tar -xzv
- modify
pyproject.toml
configuration to include tests in sdist, per pyproject.toml: include tests in sdist archive #69, then build sdist archive withpoetry build -f sdist
. - extract and enter the sdist archive: `tar -xzvf dist/pytest-socket-0.4.0.tar.gz; cd pytest-socket-0.4.0'
- build
egg_info
contents in order to allow pytest to detect it as a plugin:python setup.py egg_info
- run tests:
python -m pytest
.
Fixes
The causes seem to be fairly simple:
-
requests
is used in some of the tests but not specified as a test/dev dependency. Installingrequests
fixes one of the issues. -
Several of the source files have lines that are too long & other formatting errors, therefore breaking the flake8 checks (E501 line too long, E122 missing continuation indent). Easy fixes would be either specifying in
pytest.ini
flake8-ignore = * E501 * E122
or reformatting the source files to obey the style rules, e.g. using
black
.
Side notes
- Building the sdist, rather than simply running tests from the original source worktree, is important because we want to (1) replicate the environment of the actual archive distributed on PyPI, and (2) because we need to use
setup.py
to build theegg_info
for testing (otherwise we would need to install the package in order to test it, which is not really a great way to test things--unless I'm missing something; do you do testing some other way?). - We need to run
python -m pytest
instead of simplypytest
in order for the current library to be included in the Python library search path; this is a quirk of howpython -m
works in contrast to simply calling an executable and is a very common pytest issue.
Full failure log
==================== test session starts =====================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/kshi/pt/pytest-socket-0.4.0, configfile: pytest.ini
plugins: socket-0.4.0, anyio-3.3.0, httpbin-1.0.0, cov-2.12.1, flake8-1.0.7
collected 47 items
pytest_socket.py F [ 2%]
setup.py F [ 4%]
tests/conftest.py s [ 6%]
tests/test_async.py F.F [ 12%]
tests/test_restrict_hosts.py F....................... [ 63%]
tests/test_socket.py F................ [100%]
========================== FAILURES ==========================
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:11:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:19:80: E501 line too long (113 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:35:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:91:80: E501 line too long (85 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:109:80: E501 line too long (106 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:110:80: E501 line too long (104 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:111:80: E501 line too long (115 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:160:80: E501 line too long (87 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/setup.py:5:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:7:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:10:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:16:80: E501 line too long (4863 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_async.py:28:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_async.py:55:80: E501 line too long (86 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________ test_starlette _______________________
testdir = <Testdir local('/tmp/pytest-of-kshi/pytest-26/test_starlette0')>
@unix_sockets_only
def test_starlette(testdir):
testdir.makepyfile("""
from pytest_socket import disable_socket
from starlette.responses import HTMLResponse
from starlette.testclient import TestClient
def pytest_runtest_setup():
disable_socket()
async def app(scope, receive, send):
assert scope['type'] == 'http'
response = HTMLResponse('<html><body>Hello, world!</body></html>')
await response(scope, receive, send)
def test_app():
client = TestClient(app)
response = client.get('/')
assert response.status_code == 200
""")
result = testdir.runpytest("--verbose", "--disable-socket", "--allow-unix-socket")
> result.assert_outcomes(passed=1, skipped=0, failed=0)
E AssertionError: assert {'errors': 1,...pped': 0, ...} == {'errors': 0,...pped': 0, ...}
E Omitting 4 identical items, use -vv to show
E Differing items:
E {'errors': 1} != {'errors': 0}
E {'passed': 0} != {'passed': 1}
E Use -v to get the full diff
/home/kshi/pytest-socket-0.4.0/tests/test_async.py:56: AssertionError
-------------------- Captured stdout call --------------------
============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/kshi/.venv/bin/python
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-kshi/pytest-26/test_starlette0
plugins: socket-0.4.0, anyio-3.3.0, httpbin-1.0.0, cov-2.12.1, flake8-1.0.7
collecting ... collected 0 items / 1 error
==================================== ERRORS ====================================
______________________ ERROR collecting test_starlette.py ______________________
ImportError while importing test module '/tmp/pytest-of-kshi/pytest-26/test_starlette0/test_starlette.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test_starlette.py:3: in <module>
from starlette.testclient import TestClient
/home/kshi/.venv/lib/python3.9/site-packages/starlette/testclient.py:16: in <module>
import requests
E ModuleNotFoundError: No module named 'requests'
=========================== short test summary info ============================
ERROR test_starlette.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.13s ===============================
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:27:80: E501 line too long (90 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:44:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:63:80: E501 line too long (87 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:64:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:68:80: E501 line too long (88 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:97:80: E501 line too long (101 > 79 characters)
/home/kshi/pt/pytes```
==================== test session starts =====================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/kshi/pt/pytest-socket-0.4.0, configfile: pytest.ini
plugins: socket-0.4.0, anyio-3.3.0, httpbin-1.0.0, cov-2.12.1, flake8-1.0.7
collected 47 items
pytest_socket.py F [ 2%]
setup.py F [ 4%]
tests/conftest.py s [ 6%]
tests/test_async.py F.F [ 12%]
tests/test_restrict_hosts.py F....................... [ 63%]
tests/test_socket.py F................ [100%]
========================== FAILURES ==========================
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:11:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:19:80: E501 line too long (113 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:35:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:91:80: E501 line too long (85 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:109:80: E501 line too long (106 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:110:80: E501 line too long (104 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:111:80: E501 line too long (115 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:160:80: E501 line too long (87 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/setup.py:5:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:7:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:10:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:16:80: E501 line too long (4863 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_async.py:28:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_async.py:55:80: E501 line too long (86 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________ test_starlette _______________________
testdir = <Testdir local('/tmp/pytest-of-kshi/pytest-26/test_starlette0')>
@unix_sockets_only
def test_starlette(testdir):
testdir.makepyfile("""
from pytest_socket import disable_socket
from starlette.responses import HTMLResponse
from starlette.testclient import TestClient
def pytest_runtest_setup():
disable_socket()
async def app(scope, receive, send):
assert scope['type'] == 'http'
response = HTMLResponse('<html><body>Hello, world!</body></html>')
await response(scope, receive, send)
def test_app():
client = TestClient(app)
response = client.get('/')
assert response.status_code == 200
""")
result = testdir.runpytest("--verbose", "--disable-socket", "--allow-unix-socket")
> result.assert_outcomes(passed=1, skipped=0, failed=0)
E AssertionError: assert {'errors': 1,...pped': 0, ...} == {'errors': 0,...pped': 0, ...}
E Omitting 4 identical items, use -vv to show
E Differing items:
E {'errors': 1} != {'errors': 0}
E {'passed': 0} != {'passed': 1}
E Use -v to get the full diff
/home/kshi/pytest-socket-0.4.0/tests/test_async.py:56: AssertionError
-------------------- Captured stdout call --------------------
============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/kshi/.venv/bin/python
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-kshi/pytest-26/test_starlette0
plugins: socket-0.4.0, anyio-3.3.0, httpbin-1.0.0, cov-2.12.1, flake8-1.0.7
collecting ... collected 0 items / 1 error
==================================== ERRORS ====================================
______________________ ERROR collecting test_starlette.py ______________________
ImportError while importing test module '/tmp/pytest-of-kshi/pytest-26/test_starlette0/test_starlette.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test_starlette.py:3: in <module>
from starlette.testclient import TestClient
/home/kshi/.venv/lib/python3.9/site-packages/starlette/testclient.py:16: in <module>
import requests
E ModuleNotFoundError: No module named 'requests'
=========================== short test summary info ============================
ERROR test_starlette.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.13s ===============================
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:27:80: E501 line too long (90 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:44:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:63:80: E501 line too long (87 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:64:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:68:80: E501 line too long (88 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:97:80: E501 line too long (101 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:110:80: E501 line too long (88 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:134:80: E501 line too long (89 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:162:80: E501 line too long (93 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:166:80: E501 line too long (94 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:234:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:246:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:256:80: E501 line too long (86 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
----------- coverage: platform linux, python 3.9.6-final-0 -----------
Name Stmts Miss Cover
--------------------------------------
pytest_socket.py 86 26 70%
--------------------------------------
TOTAL 86 26 70%
================== short test summary info ===================
FAILED pytest_socket.py::FLAKE8
FAILED setup.py::F```
==================== test session starts =====================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/kshi/pt/pytest-socket-0.4.0, configfile: pytest.ini
plugins: socket-0.4.0, anyio-3.3.0, httpbin-1.0.0, cov-2.12.1, flake8-1.0.7
collected 47 items
pytest_socket.py F [ 2%]
setup.py F [ 4%]
tests/conftest.py s [ 6%]
tests/test_async.py F.F [ 12%]
tests/test_restrict_hosts.py F....................... [ 63%]
tests/test_socket.py F................ [100%]
========================== FAILURES ==========================
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:11:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:19:80: E501 line too long (113 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:35:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:91:80: E501 line too long (85 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:109:80: E501 line too long (106 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:110:80: E501 line too long (104 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:111:80: E501 line too long (115 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/pytest_socket.py:160:80: E501 line too long (87 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/setup.py:5:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:7:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:10:1: E122 continuation line missing indentation or outdented
/home/kshi/pt/pytest-socket-0.4.0/setup.py:16:80: E501 line too long (4863 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_async.py:28:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_async.py:55:80: E501 line too long (86 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________ test_starlette _______________________
testdir = <Testdir local('/tmp/pytest-of-kshi/pytest-26/test_starlette0')>
@unix_sockets_only
def test_starlette(testdir):
testdir.makepyfile("""
from pytest_socket import disable_socket
from starlette.responses import HTMLResponse
from starlette.testclient import TestClient
def pytest_runtest_setup():
disable_socket()
async def app(scope, receive, send):
assert scope['type'] == 'http'
response = HTMLResponse('<html><body>Hello, world!</body></html>')
await response(scope, receive, send)
def test_app():
client = TestClient(app)
response = client.get('/')
assert response.status_code == 200
""")
result = testdir.runpytest("--verbose", "--disable-socket", "--allow-unix-socket")
> result.assert_outcomes(passed=1, skipped=0, failed=0)
E AssertionError: assert {'errors': 1,...pped': 0, ...} == {'errors': 0,...pped': 0, ...}
E Omitting 4 identical items, use -vv to show
E Differing items:
E {'errors': 1} != {'errors': 0}
E {'passed': 0} != {'passed': 1}
E Use -v to get the full diff
/home/kshi/pytest-socket-0.4.0/tests/test_async.py:56: AssertionError
-------------------- Captured stdout call --------------------
============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/kshi/.venv/bin/python
cachedir: .pytest_cache
rootdir: /tmp/pytest-of-kshi/pytest-26/test_starlette0
plugins: socket-0.4.0, anyio-3.3.0, httpbin-1.0.0, cov-2.12.1, flake8-1.0.7
collecting ... collected 0 items / 1 error
==================================== ERRORS ====================================
______________________ ERROR collecting test_starlette.py ______________________
ImportError while importing test module '/tmp/pytest-of-kshi/pytest-26/test_starlette0/test_starlette.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test_starlette.py:3: in <module>
from starlette.testclient import TestClient
/home/kshi/.venv/lib/python3.9/site-packages/starlette/testclient.py:16: in <module>
import requests
E ModuleNotFoundError: No module named 'requests'
=========================== short test summary info ============================
ERROR test_starlette.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.13s ===============================
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:27:80: E501 line too long (90 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:44:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:63:80: E501 line too long (87 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:64:80: E501 line too long (86 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:68:80: E501 line too long (88 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:97:80: E501 line too long (101 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:110:80: E501 line too long (88 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:134:80: E501 line too long (89 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:162:80: E501 line too long (93 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:166:80: E501 line too long (94 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:234:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:246:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:256:80: E501 line too long (86 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
----------- coverage: platform linux, python 3.9.6-final-0 -----------
Name Stmts Miss Cover
--------------------------------------
pytest_socket.py 86 26 70%
--------------------------------------
TOTAL 86 26 70%
================== short test summary info ===================
FAILED pytest_socket.py::FLAKE8
FAILED setup.py::FLAKE8
FAILED tests/test_async.py::FLAKE8
FAILED tests/test_async.py::test_starlette - AssertionError...
FAILED tests/test_restrict_hosts.py::FLAKE8
FAILED tests/test_socket.py::FLAKE8
========== 6 failed, 40 passed, 1 skipped in 6.44s ===========
```LAKE8
FAILED tests/test_async.py::FLAKE8
FAILED tests/test_async.py::test_starlette - AssertionError...
FAILED tests/test_restrict_hosts.py::FLAKE8
FAILED tests/test_socket.py::FLAKE8
========== 6 failed, 40 passed, 1 skipped in 6.44s ===========
```t-socket-0.4.0/tests/test_restrict_hosts.py:110:80: E501 line too long (88 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:134:80: E501 line too long (89 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:162:80: E501 line too long (93 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_restrict_hosts.py:166:80: E501 line too long (94 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
________________________ FLAKE8-check ________________________
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:234:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:246:80: E501 line too long (109 > 79 characters)
/home/kshi/pt/pytest-socket-0.4.0/tests/test_socket.py:256:80: E501 line too long (86 > 79 characters)
--------------------- Captured log call ----------------------
WARNING flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
----------- coverage: platform linux, python 3.9.6-final-0 -----------
Name Stmts Miss Cover
--------------------------------------
pytest_socket.py 86 26 70%
--------------------------------------
TOTAL 86 26 70%
================== short test summary info ===================
FAILED pytest_socket.py::FLAKE8
FAILED setup.py::FLAKE8
FAILED tests/test_async.py::FLAKE8
FAILED tests/test_async.py::test_starlette - AssertionError...
FAILED tests/test_restrict_hosts.py::FLAKE8
FAILED tests/test_socket.py::FLAKE8
========== 6 failed, 40 passed, 1 skipped in 6.44s ===========