Skip to content

1.7.1: pytest is failing #153

Description

@kloczek

Just normal build, install and test cycle used on building package from non-root account:

  • "setup.py build"
  • "setup.py install --root </install/prefix>"
  • "pytest with PYTHONPATH pointing to setearch and sitelib inside </install/prefix>
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pysocks-1.7.1-11.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pysocks-1.7.1-11.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/PySocks-1.7.1
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, Faker-8.10.0
collected 19 items

. .                                                                                                                                                                  [  5%]
test/test_pysocks.py EEEEEEEEEEEEEEEEE                                                                                                                               [100%]

================================================================================== ERRORS ==================================================================================
_______________________________________________________ ERROR at setup of PySocksTestCase.test_global_override_http ________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
Testing [3proxy:http] proxy server on 127.0.0.2:7776
ERROR [Errno 111] Connection refused
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
/bin/sh: line 1: test/bin/3proxy: No such file or directory
______________________________________________________ ERROR at setup of PySocksTestCase.test_global_override_socks5 _______________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
___________________________________________________________ ERROR at setup of PySocksTestCase.test_http_ip_proxy ___________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
____________________________________________________________ ERROR at setup of PySocksTestCase.test_http_proxy _____________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
_______________________________________________________________ ERROR at setup of PySocksTestCase.test_ipv6 ________________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
__________________________________________________________ ERROR at setup of PySocksTestCase.test_socks4_ip_proxy __________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
___________________________________________________________ ERROR at setup of PySocksTestCase.test_socks4_proxy ____________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
__________________________________________________________ ERROR at setup of PySocksTestCase.test_socks5_ip_proxy __________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
___________________________________________________________ ERROR at setup of PySocksTestCase.test_socks5_proxy ____________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
___________________________________________________ ERROR at setup of PySocksTestCase.test_socks5_proxy_connect_timeout ____________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
________________________________________________________ ERROR at setup of PySocksTestCase.test_socks5_read_timeout ________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
___________________________________________________________ ERROR at setup of PySocksTestCase.test_stdlib_socket ___________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
___________________________________________________________ ERROR at setup of PySocksTestCase.test_urllib2_http ____________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
_______________________________________________________ ERROR at setup of PySocksTestCase.test_urllib2_http_handler ________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
______________________________________________________ ERROR at setup of PySocksTestCase.test_urllib2_socks4_handler _______________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
__________________________________________________________ ERROR at setup of PySocksTestCase.test_urllib2_socks5 ___________________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
______________________________________________________ ERROR at setup of PySocksTestCase.test_urllib2_socks5_handler _______________________________________________________

    @pytest.fixture(scope='session', autouse=True)
    def proxy_server():
        th = Thread(target=proxy_thread)
        th.daemon = True
        th.start()
>       wait_for_socket('3proxy:http', PROXY_HOST_IP,
                        HTTP_PROXY_PORT)

test/test_pysocks.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

server_name = '3proxy:http', host = '127.0.0.2', port = 7776, timeout = 2

    def wait_for_socket(server_name, host, port, timeout=2):
        ok = False
        for x in range(10):
            try:
                print('Testing [%s] proxy server on %s:%d'
                      % (server_name, host, port))
                s = socket(AF_INET, SOCK_STREAM)
                s.connect((host, port))
                s.close()
            except error as ex:
                print('ERROR', ex)
                time.sleep(timeout/10.0)
            else:
                print('Connection established')
                ok = True
                break
        if not ok:
>           raise Exception('The %s proxy server has not started in %d seconds'
                            % (server_name, timeout))
E           Exception: The 3proxy:http proxy server has not started in 2 seconds

test/util.py:22: Exception
========================================================================= short test summary info ==========================================================================
ERROR test/test_pysocks.py::PySocksTestCase::test_global_override_http - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_global_override_socks5 - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_http_ip_proxy - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_http_proxy - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_ipv6 - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_socks4_ip_proxy - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_socks4_proxy - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_socks5_ip_proxy - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_socks5_proxy - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_socks5_proxy_connect_timeout - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_socks5_read_timeout - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_stdlib_socket - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_urllib2_http - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_urllib2_http_handler - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_urllib2_socks4_handler - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_urllib2_socks5 - Exception: The 3proxy:http proxy server has not started in 2 seconds
ERROR test/test_pysocks.py::PySocksTestCase::test_urllib2_socks5_handler - Exception: The 3proxy:http proxy server has not started in 2 seconds
======================================================================= 1 passed, 17 errors in 8.56s =======================================================================

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions