repo_id stringclasses 400
values | cross_repo_split stringclasses 1
value | commit_index int32 0 1.19k | commit_sha stringlengths 40 40 | in_repo_split stringclasses 3
values | test_file stringlengths 7 121 | file_split stringclasses 3
values | split_group stringlengths 18 150 | lineno int32 1 5.24k | col_offset int32 0 165 | assertion_type stringclasses 35
values | test_function stringlengths 0 141 | prefix large_stringlengths 7 258k | target stringlengths 1 29.2k | assertion_event_type stringclasses 2
values | assertion_event_id stringlengths 64 64 | assertion_anchor large_stringlengths 14 176k | old_target stringlengths 1 11.2k ⌀ | old_lineno int32 2 4.91k ⌀ | old_col_offset int32 0 165 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 175 | 8 | self.assertRaises | test_total_applies_connect | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | ConnectTimeoutError) | modified | 866b26837b677b3a0cda4256ad9ac081651dfbf6463c85ea95dce0bae52d3488 | self.assertRaises|test_total_applies_connect|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSE... | ConnectTimeoutError) | 173 | 8 |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 199 | 8 | self.assertRaises | test_total_timeout | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | ReadTimeoutError) | modified | f6f0718c50e47e9d0d529115121b07ed5ede4a55d9425986897977dfdd65e9ec | self.assertRaises|test_total_timeout|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVAL... | ReadTimeoutError) | 197 | 8 |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 221 | 8 | self.assertEqual | test_post_url | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | r.data) | modified | 2968099e07d29249b1b8b39717dc52f8c21301c6982db27d6c2f3499b5099da5 | self.assertEqual|test_post_url|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOU... | r.data) | 219 | 8 |
urllib3/urllib3 | train | 202 | 7002c1347c677b2743244bf36bd05aa3625f57f1 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 927 | 12 | self.assertTrue | test_redirect_with_failed_tell | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | 'Unable to record file position for' in str(e)) | added | f50dcd8356bcb4eccbae2ec43defe89aa78fffffbf2a6e1041dd91c842dadf25 | self.assertTrue|test_redirect_with_failed_tell|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRES... | null | null | null |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 280 | 8 | self.assertEqual | test_absolute_url | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | c._absolute_url('path?query=foo')) | added | af126dbd256744d70c4b321688428060963821b17a6e03f2ce1abb42a7723ff7 | self.assertEqual|test_absolute_url|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages... | null | null | null |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 385 | 8 | self.assertTrue | test_custom_http_response_class | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | isinstance(response, CustomHTTPResponse)) | added | 45f26688df9cd73f6c100f1aa0b44d56b6825f0e34766e0dc5ce99a3aec4b59d | self.assertTrue|test_custom_http_response_class|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from url... | null | null | null |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 788 | 8 | self.assertEqual | test_retry_return_in_response | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | (RequestHistory('GET', '/successful_retry', None, 418, None),)) | added | 375fd072e346ab2d98a7f07acb87ca77bb0fba22af57e63984b040fd8f3c3b79 | self.assertEqual|test_retry_return_in_response|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRES... | null | null | null |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 793 | 8 | self.assertEqual | test_retry_redirect_history | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | (RequestHistory('GET', '/redirect?target=%2F', None, 303, '/'),)) | added | 4b68556132f0930bfd2b196d5c5e95a392b0ddc54a38cf2eb8e0cb9115f5579c | self.assertEqual|test_retry_redirect_history|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSE... | null | null | null |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 868 | 8 | self.assertTrue | test_redirect_after | import errno
import io
import logging
import socket
import sys
import unittest
import time
import warnings
from datetime import datetime
from datetime import timedelta
import mock
from .. import (
requires_network, onlyPy3, onlyPy26OrOlder,
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
fro... | delta >= 1) | modified | 176a1f93bb415c051d3c26048ef4bacb47910299db46845a21bf720c0f861ad3 | self.assertTrue|test_redirect_after|import errno import io import logging import socket import sys import unittest import time import warnings from datetime import datetime from datetime import timedelta import mock from .. import ( requires_network, onlyPy3, onlyPy26OrOlder, TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALI... | delta < 1) | 871 | 8 |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 82 | 12 | self.assertTrue | test_proxy_verified | import json
import socket
import unittest
from nose.tools import timed
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import (
DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address)
from .. import TARPIT_HOST, requires_network
from urllib3._collections i... | 'certificate verify failed' in str(e)) | modified | dbff871b25ea181c89471c6915693c0002d0258359543f4eff0fa1567777c293 | self.assertTrue|test_proxy_verified|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_networ... | 'certificate verify failed' in str(e)) | 82 | 12 |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 154 | 8 | self.assertEqual | test_cross_protocol_redirect | import json
import socket
import unittest
from nose.tools import timed
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import (
DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address)
from .. import TARPIT_HOST, requires_network
from urllib3._collections i... | self.https_host) | modified | 3b76f8888849e25293beb136df9fbe10b1b201804923790456fb045abd137d49 | self.assertEqual|test_cross_protocol_redirect|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requi... | self.https_host) | 154 | 8 |
urllib3/urllib3 | train | 203 | ebd82196760c26144b3972062d3adae21ac0543d | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 303 | 12 | self.assertEqual | test_https_proxy_pool_timeout | import json
import socket
import unittest
from nose.tools import timed
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import (
DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address)
from .. import TARPIT_HOST, requires_network
from urllib3._collections i... | ConnectTimeoutError) | modified | 7f6cf308db065f3af751b20742ceaee1f80709da10838c16e96e13023a96d3c9 | self.assertEqual|test_https_proxy_pool_timeout|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requ... | ConnectTimeoutError) | 301 | 12 |
urllib3/urllib3 | train | 204 | 4bde697827fcf57680a1de28f4a52192939f64f1 | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 25 | 16 | self.assertRaises | test_inject_validate_fail_cryptography | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from mock import patch... | ImportError) | added | e6a76eec8bd021e4d25b06b2a9708df7084794d8a0dc9fbffc067ea82dfe8f18 | self.assertRaises|test_inject_validate_fail_cryptography|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) from mock import pa... | null | null | null |
urllib3/urllib3 | train | 204 | 4bde697827fcf57680a1de28f4a52192939f64f1 | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 40 | 16 | self.assertRaises | test_inject_validate_fail_pyopenssl | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from mock import patch... | ImportError) | added | dfe1bd12dc3c1c94bd38b831a890987ee4d87fa6a9bad9563a0378c364368361 | self.assertRaises|test_inject_validate_fail_pyopenssl|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) from mock import patch... | null | null | null |
urllib3/urllib3 | train | 205 | 43a0d3dbf273669c11c41d4f526fc1fe1edcae17 | train | test/test_queue_monkeypatch.py | train | urllib3/urllib3:test/test_queue_monkeypatch.py | 26 | 12 | self.assertRaises | test_queue_monkeypatching | from __future__ import absolute_import
import mock
import unittest
import urllib3
from urllib3.exceptions import EmptyPoolError
from urllib3.packages.six.moves import queue
class BadError(Exception):
"""
This should not be raised.
"""
pass
class TestMonkeypatchResistance(unittest.TestCase):
"""... | EmptyPoolError) | added | 2ed0dbd44cc1b6efe25e6ba216a6ef8decc19417f21367cda3492ec590668630 | self.assertRaises|test_queue_monkeypatching|from __future__ import absolute_import import mock import unittest import urllib3 from urllib3.exceptions import EmptyPoolError from urllib3.packages.six.moves import queue class BadError(Exception): """ This should not be raised. """ pass class TestMonkeypatchResistance(unit... | null | null | null |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 42 | 8 | self.assertRaises | test_retry_higher_total_loses | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | MaxRetryError) | modified | c1ba72f645526d2bc383d12d92cee1e8ae9d60371f0b33002826cd83249b6a69 | self.assertRaises|test_retry_higher_total_loses|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class Retry... | MaxRetryError) | 42 | 8 |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 88 | 8 | self.assertTrue | test_retry_default | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | Retry(0).raise_on_redirect) | modified | a887aa70b0ba1b034e28e4fc0df5bcd98ab3687fb397ebec0f8f47380da565c6 | self.assertTrue|test_retry_default|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest... | Retry(0).raise_on_redirect) | 88 | 8 |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 185 | 8 | self.assertRaises | test_disabled | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | MaxRetryError) | modified | e64cf030fe483b62601001c1ee7430cd32999720b4082ed15e4a8f70bb7f479a | self.assertRaises|test_disabled|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Te... | MaxRetryError) | 185 | 8 |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 232 | 8 | self.assertEqual | test_history | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | (RequestHistory('GET', '/test1', connection_error, None, None),)) | modified | 735cb11669fbff9f3f72b674bb87a2008d2bc8b69d163d8ade4a6b2c568b1751 | self.assertEqual|test_history|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Test... | (RequestHistory('GET', '/test1', connection_error, None, None),)) | 232 | 8 |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 226 | 12 | self.assertEqual | test_timeout_errors_cause_retries | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | b'Response 2') | added | cdb20b1fe46c7d4c9e494b4aedae43bbbd52a10c6b681bb53e480669499fec9e | self.assertEqual|test_timeout_errors_cause_retries|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetry... | null | null | null |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 254 | 12 | self.assertRaises | test_delayed_body_read_timeout | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | ReadTimeoutError) | added | c784713a15658908d634d003e7e987a7c8f9ddb32d1b297fdd8373e4789281be | self.assertRaises|test_delayed_body_read_timeout|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryEr... | null | null | null |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 379 | 16 | self.assertEqual | test_connection_cleanup_on_read_timeout | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | pool.pool.qsize()) | added | 24619a28395e1b17d6cbf8f40248456711282d8c358de0d900e18a84aa9163d9 | self.assertEqual|test_connection_cleanup_on_read_timeout|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( Ma... | null | null | null |
urllib3/urllib3 | train | 206 | bb0805df13156c0f92f41eb00727de46061e8512 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 440 | 12 | assert | test_connection_closed_on_read_timeout_preload_false | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
Connect... | rlist | added | ce6d776a6b40cefd531b3a43d4856857ecc2c0e428150e7886908ff3768f7a5f | assert|test_connection_closed_on_read_timeout_preload_false|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import (... | null | null | null |
urllib3/urllib3 | train | 207 | 49788f808022d0f0ddeb9049672fe9593316ab64 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 218 | 8 | self.assertRaises | test_register_invalid_fileobj | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | ValueError) | added | 7a102a69698bd7171421e3b24bf3f0bf2406b81eb6191b8ad6ccc3acfa253f4c | self.assertRaises|test_register_invalid_fileobj|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest exc... | null | null | null |
urllib3/urllib3 | train | 207 | 49788f808022d0f0ddeb9049672fe9593316ab64 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 408 | 12 | self.assertEqual | test_select_timeout_ready | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | len(s.select(timeout=0.001))) | added | 0fd42c27ecb64e7293ee1efe9f975b1bad5f5f5fc7d1c3ead803543e428c99ce | self.assertEqual|test_select_timeout_ready|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest except I... | null | null | null |
urllib3/urllib3 | train | 207 | 49788f808022d0f0ddeb9049672fe9593316ab64 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 541 | 8 | self.assertEqual | test_selector_error | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | "<SelectorError errno=1>") | added | b6a7ff66021b65704cca48e0c8d1b5f4066cd52b0601e4bdda940ed4bed4a108 | self.assertEqual|test_selector_error|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import unittest except ImportE... | null | null | null |
urllib3/urllib3 | train | 207 | 49788f808022d0f0ddeb9049672fe9593316ab64 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 592 | 12 | self.assertCountEqual | test_wait_for_write_multiple_socket | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skip, skipIf, skipUnless
import unittest
except ImportError:
from unittest2 im... | result) | added | 85a1a921bceedb455b4db0dd7fae590f738bf0c2d444d73120cd141210b819f7 | self.assertCountEqual|test_wait_for_write_multiple_socket|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skip, skipIf, skipUnless import un... | null | null | null |
urllib3/urllib3 | train | 208 | 0cb7780a0613baa518be26df4b623ecb0ab3cbe5 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 182 | 8 | self.assertEqual | test_retry_exception_str | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | "HTTPConnectionPool(host='localhost', port=None): " "Max retries exceeded with url: Test. (Caused by None)") | added | 28bc66cb38fc91824fbc4e66fe2d22a5a7ed65b3db40dc092137e7d2cb9a020e | self.assertEqual|test_retry_exception_str|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.p... | null | null | null |
urllib3/urllib3 | train | 208 | 0cb7780a0613baa518be26df4b623ecb0ab3cbe5 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 223 | 8 | self.assertRaises | test_pool_size | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | MaxRetryError) | added | b104c5c878af50e13275e0ae95c3e4d61a89e1ee6138edc859a6be47f50d30e9 | self.assertRaises|test_pool_size|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.s... | null | null | null |
urllib3/urllib3 | train | 208 | 0cb7780a0613baa518be26df4b623ecb0ab3cbe5 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 293 | 8 | self.assertEqual | test_absolute_url | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | c._absolute_url('path?query=foo')) | added | 244f12930c50ef40c2b8355f79eb286ee1e0d40ab2dc10c905ded5ba86156100 | self.assertEqual|test_absolute_url|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages... | null | null | null |
urllib3/urllib3 | train | 208 | 0cb7780a0613baa518be26df4b623ecb0ab3cbe5 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 398 | 8 | self.assertTrue | test_custom_http_response_class | from __future__ import absolute_import
import unittest
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_c... | isinstance(response, CustomHTTPResponse)) | added | 5d5780fd007eadc877d6f9e15095b03c95125f166f81b00280121c84648deafa | self.assertTrue|test_custom_http_response_class|from __future__ import absolute_import import unittest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from url... | null | null | null |
urllib3/urllib3 | train | 209 | 89e2ede7b0a92ced0145bb3031b0bfaff2df567b | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 305 | 8 | self.assertRaises | test_connection_timeouts | import threading
import socket
from urllib3.contrib import socks
from urllib3.exceptions import ConnectTimeoutError, NewConnectionError
from dummyserver.server import DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
import ssl
from urll... | ConnectTimeoutError) | added | ab1cd9438ddc6ef71ad0002fcc0dc7f9c0937a5d93c83a353c6574fd6779727d | self.assertRaises|test_connection_timeouts|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import Ski... | null | null | null |
urllib3/urllib3 | train | 209 | 89e2ede7b0a92ced0145bb3031b0bfaff2df567b | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 417 | 12 | self.assertEqual | test_source_address_works | import threading
import socket
from urllib3.contrib import socks
from urllib3.exceptions import ConnectTimeoutError, NewConnectionError
from dummyserver.server import DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
import ssl
from urll... | '16.17.18.19') | added | 075d9330d34336df10621b839f8038275921ae07ef4650cea8214b6be4c655c5 | self.assertEqual|test_source_address_works|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import Ski... | null | null | null |
urllib3/urllib3 | train | 209 | 89e2ede7b0a92ced0145bb3031b0bfaff2df567b | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 572 | 12 | self.assertEqual | test_socks4_with_username | import threading
import socket
from urllib3.contrib import socks
from urllib3.exceptions import ConnectTimeoutError, NewConnectionError
from dummyserver.server import DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
import ssl
from urll... | '16.17.18.19') | added | 715f5c10060773edb3fad5dca0d94b1e07156586b3894f8b59e1cc9cd0f10c89 | self.assertEqual|test_socks4_with_username|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip import Ski... | null | null | null |
urllib3/urllib3 | train | 209 | 89e2ede7b0a92ced0145bb3031b0bfaff2df567b | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 610 | 12 | self.assertTrue | test_socks_with_invalid_username | import threading
import socket
from urllib3.contrib import socks
from urllib3.exceptions import ConnectTimeoutError, NewConnectionError
from dummyserver.server import DEFAULT_CERTS
from dummyserver.testcase import IPV4SocketDummyServerTestCase
from nose.plugins.skip import SkipTest
try:
import ssl
from urll... | "different user-ids" in str(e)) | added | 7825247298cacf064701b430a01308ac88274b87ec12b644b709123470ae7edd | self.assertTrue|test_socks_with_invalid_username|import threading import socket from urllib3.contrib import socks from urllib3.exceptions import ConnectTimeoutError, NewConnectionError from dummyserver.server import DEFAULT_CERTS from dummyserver.testcase import IPV4SocketDummyServerTestCase from nose.plugins.skip impo... | null | null | null |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/benchmark.py | train | urllib3/urllib3:test/benchmark.py | 39 | 4 | assert | #!/usr/bin/env python
"""
Really simple rudimentary benchmark to compare ConnectionPool versus standard
urllib to demonstrate the usefulness of connection re-using.
"""
from __future__ import print_function
import sys
import time
import urllib
sys.path.append('../')
import urllib3 # noqa: E402
# URLs to download.... | url_list | modified | 0692894f82c6a698c861c06957113b75caacc0af1c2396fc61d66f7c94e2fc36 | assert||#!/usr/bin/env python """ Really simple rudimentary benchmark to compare ConnectionPool versus standard urllib to demonstrate the usefulness of connection re-using. """ from __future__ import print_function import sys import time import urllib sys.path.append('../') import urllib3 # noqa: E402 # URLs to downloa... | url_list | 39 | 4 | |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 41 | 16 | self.assertRaises | test_inject_validate_fail_pyopenssl | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3)
except ImportError as e:
raise SkipTest('Could not import PyOpenSSL: %r' % e)
from mock import patch... | ImportError) | modified | 21ab38791b19cbd61a5858cd1a8fabdede59b6c48fde460f645126f25812cafa | self.assertRaises|test_inject_validate_fail_pyopenssl|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) from mock import patch... | ImportError) | 40 | 16 |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 57 | 8 | self.assertGreater | test_recent_date | import datetime
import mock
import sys
from urllib3.connection import (
CertificateError,
_match_hostname,
RECENT_DATE
)
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
class TestConnection(unittest.TestCase):
"""
Tests in this suite should not make any ... | (datetime.datetime.today() - two_years).date()) | modified | e16344e36b3beacb2da2ff2e7b98e46738c2bc118b4651049cdb9a0c3a906183 | self.assertGreater|test_recent_date|import datetime import mock import sys from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest class TestConnection(unittest.TestCase): """ Tests in this suite should not make ... | (datetime.datetime.today() - two_years).date()) | 58 | 8 |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 126 | 8 | self.assertEqual | test_request_fields | import unittest
from urllib3.filepost import encode_multipart_formdata, iter_fields
from urllib3.fields import RequestField
from urllib3.packages.six import b, u
BOUNDARY = '!! test boundary !!'
class TestIterfields(unittest.TestCase):
def test_dict(self):
for fieldname, value in iter_fields(dict(a='b... | expected) | modified | fceaf983fc4ce355c57bbe61cebb01083e91962e9f146ab825ca4c396b86cc46 | self.assertEqual|test_request_fields|import unittest from urllib3.filepost import encode_multipart_formdata, iter_fields from urllib3.fields import RequestField from urllib3.packages.six import b, u BOUNDARY = '!! test boundary !!' class TestIterfields(unittest.TestCase): def test_dict(self): for fieldname, value in it... | b'--' + b(BOUNDARY) + b'\r\n' b'Content-Type: image/jpeg\r\n' b'\r\n' b'v\r\n' b'--' + b(BOUNDARY) + b'--\r\n') | 127 | 6 |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 226 | 8 | self.assertRaises | test_reregister_fd_different_fileobj | from __future__ import with_statement
import errno
import os
import psutil
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unittest2 import s... | KeyError) | modified | ef7d322016221c219b89d15f2750fd6948e30b471ddc80d811bb1e6bf09a9397 | self.assertRaises|test_reregister_fd_different_fileobj|from __future__ import with_statement import errno import os import psutil import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest ex... | KeyError) | 226 | 8 |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 58 | 12 | self.assertEqual | _test_body | # -*- coding: utf-8 -*-
from urllib3 import HTTPConnectionPool
from urllib3.packages import six
from dummyserver.testcase import SocketDummyServerTestCase
class TestChunkedTransfer(SocketDummyServerTestCase):
def start_chunked_handler(self):
self.buffer = b''
def socket_handler(listener):
... | b'0\r\n\r\n') | modified | 233efe3ef1ed58232c4bb885ea57f3d86bee8efd245749c352930bd541949fec | self.assertEqual|_test_body|# -*- coding: utf-8 -*- from urllib3 import HTTPConnectionPool from urllib3.packages import six from dummyserver.testcase import SocketDummyServerTestCase class TestChunkedTransfer(SocketDummyServerTestCase): def start_chunked_handler(self): self.buffer = b'' def socket_handler(listener): so... | b'0\r\n\r\n') | 58 | 12 |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 308 | 8 | self.assertRaises | test_assert_invalid_fingerprint | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | SSLError) | modified | b97b1dd306ba66021080fa1a115792ec41b7433636629fae6eabcd6d0e82db7c | self.assertRaises|test_assert_invalid_fingerprint|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA... | SSLError) | 311 | 8 |
urllib3/urllib3 | train | 210 | c0ce2c8ec800b571938807f15902b1dd52d0d6be | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 83 | 8 | self.assertEqual | test_cross_host_redirect | import unittest
import json
from nose.plugins.skip import SkipTest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import (HTTPDummyServerTestCase,
IPv6HTTPDummyServerTestCase)
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_sch... | self.host_alt) | modified | ffe8f20386305472418cbf566e6a2b1f4d3e6d0e7cafe50899ed71742fb41840 | self.assertEqual|test_cross_host_redirect|import unittest import json from nose.plugins.skip import SkipTest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port... | self.host_alt) | 82 | 8 |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 309 | 8 | self.assertEqual | test_absolute_url | from __future__ import absolute_import
import sys
from urllib3.connectionpool import (
connection_from_url,
HTTPConnection,
HTTPConnectionPool,
HTTPSConnectionPool,
)
from urllib3.response import httplib, HTTPResponse
from urllib3.util.timeout import Timeout
from urllib3.packages.six.moves.http_client... | c._absolute_url('path?query=foo')) | added | b6daee2208f4b4b0437cba3e0c2063b0d6a1aa30d7d8a856fe95770fae79166a | self.assertEqual|test_absolute_url|from __future__ import absolute_import import sys from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packages.six.... | null | null | null |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/test_no_ssl.py | train | urllib3/urllib3:test/test_no_ssl.py | 89 | 8 | self.assertRaises | test_cannot_import_ssl | """
Test what happens if Python was built without SSL
* Everything that does not involve HTTPS should still work
* HTTPS requests must fail with an error that points at the ssl module
"""
import sys
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
class ImportBlocker(object)... | ImportError) | modified | 088a2b584b45a41d48adf505330a7b088a5ba175c574a1c81b9b665e6f4e6a56 | self.assertRaises|test_cannot_import_ssl|""" Test what happens if Python was built without SSL * Everything that does not involve HTTPS should still work * HTTPS requests must fail with an error that points at the ssl module """ import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittes... | ImportError) | 86 | 8 |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 226 | 8 | self.assertFalse | test_default_pool_key_funcs_copy | import functools
from collections import namedtuple
import sys
from urllib3.poolmanager import (
_default_key_normalizer,
HTTPPoolKey,
HTTPSPoolKey,
key_fn_by_scheme,
PoolManager,
SSL_KEYWORDS,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
L... | p.key_fn_by_scheme is key_fn_by_scheme) | added | c1d0d2290fdfcffd329fbe38baac57d4fa4b4bd08c93e5495eba4bba8f8cfa7d | self.assertFalse|test_default_pool_key_funcs_copy|import functools from collections import namedtuple import sys from urllib3.poolmanager import ( _default_key_normalizer, HTTPPoolKey, HTTPSPoolKey, key_fn_by_scheme, PoolManager, SSL_KEYWORDS, ) from urllib3 import connection_from_url from urllib3.exceptions import ( C... | null | null | null |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/test_proxymanager.py | val | urllib3/urllib3:test/test_proxymanager.py | 50 | 8 | self.assertRaises | test_invalid_scheme | import sys
from urllib3.poolmanager import ProxyManager
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
class TestProxyManager(unittest.TestCase):
def test_proxy_headers(self):
p = ProxyManager('http://something:1234')
self.addCleanup(p.clear)
ur... | AssertionError) | added | 834fb92e0bc4adf96e33b193324ce5817b84913766fd09ec99df70899c2c50b3 | self.assertRaises|test_invalid_scheme|import sys from urllib3.poolmanager import ProxyManager if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest class TestProxyManager(unittest.TestCase): def test_proxy_headers(self): p = ProxyManager('http://something:1234') self.addCleanup(p.clear) url ... | null | null | null |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/test_queue_monkeypatch.py | train | urllib3/urllib3:test/test_queue_monkeypatch.py | 33 | 12 | self.assertRaises | test_queue_monkeypatching | from __future__ import absolute_import
import mock
import sys
import urllib3
from urllib3.exceptions import EmptyPoolError
from urllib3.packages.six.moves import queue
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
class BadError(Exception):
"""
This should not be... | EmptyPoolError) | added | 0a205cc262f5c6ab32684d05758ccdb5cf128a0bed33ef6ff9702ea4d320edc3 | self.assertRaises|test_queue_monkeypatching|from __future__ import absolute_import import mock import sys import urllib3 from urllib3.exceptions import EmptyPoolError from urllib3.packages.six.moves import queue if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest class BadError(Exception):... | null | null | null |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 514 | 8 | self.assertRaises | test_bad_decode | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encode_multipart_formdata,
HTTPConnectionPool,
)
fro... | DecodeError) | added | 1ca567b6fd37d99e0c6abef164b289ef875aeb42479f5554a474599795236c83 | self.assertRaises|test_bad_decode|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTPC... | null | null | null |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/with_dummyserver/test_no_ssl.py | test | urllib3/urllib3:test/with_dummyserver/test_no_ssl.py | 29 | 12 | self.assertTrue | test_simple | """
Test connections without the builtin ssl module
Note: Import urllib3 inside the test functions to get the importblocker to work
"""
from ..test_no_ssl import TestWithoutSSL
from dummyserver.testcase import (
HTTPDummyServerTestCase, HTTPSDummyServerTestCase)
import urllib3
class TestHTTPWithoutSSL(HTTP... | 'SSL module is not available' in str(e)) | added | 10e29b67e538822e701c416b29468c03c75b56b2472d834bac4b85f10d709aae | self.assertTrue|test_simple|""" Test connections without the builtin ssl module Note: Import urllib3 inside the test functions to get the importblocker to work """ from ..test_no_ssl import TestWithoutSSL from dummyserver.testcase import ( HTTPDummyServerTestCase, HTTPSDummyServerTestCase) import urllib3 class TestHTTP... | null | null | null |
urllib3/urllib3 | train | 211 | ee564fd7e6e7bd79ff7ed410ce9eea553a22fc56 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 48 | 8 | self.assertEqual | test_nagle_proxy | import json
import socket
import unittest
from nose.tools import timed
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase
from dummyserver.server import (
DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address)
from .. import TARPIT_HOST, requires_network
from urllib3._collections i... | "Expected TCP_NODELAY for proxies to be set " "to zero, instead was %s" % tcp_nodelay_setting) | modified | 0a18a19941ba8bc7f2afe43a006ddd4fb674e1058c88fcd9be1919a38a9418b9 | self.assertEqual|test_nagle_proxy|import json import socket import unittest from nose.tools import timed from dummyserver.testcase import HTTPDummyProxyTestCase, IPv6HTTPDummyProxyTestCase from dummyserver.server import ( DEFAULT_CA, DEFAULT_CA_BAD, get_unreachable_address) from .. import TARPIT_HOST, requires_network ... | "Expected TCP_NODELAY for proxies to be set " "to zero, instead was %s" % tcp_nodelay_setting) | 46 | 8 |
urllib3/urllib3 | train | 212 | 3bf300931d073f901908813216d139c9ef9c1b4a | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 205 | 12 | self.assertEqual | test_unparse_url | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | expected_Url.url) | added | 1fe0ab4044645ba92ea779dad6245c3d3f01684b4aa64bb9640b3cf00b1b0f43 | self.assertEqual|test_unparse_url|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from... | null | null | null |
urllib3/urllib3 | train | 212 | 3bf300931d073f901908813216d139c9ef9c1b4a | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 311 | 8 | self.assertRaises | test_rewind_body_failed_seek | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | UnrewindableBodyError) | added | ffeacc8f43ffab531b6d3613a3286164e4cc4971861ba9b73e92897c7401aaa5 | self.assertRaises|test_rewind_body_failed_seek|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FA... | null | null | null |
urllib3/urllib3 | train | 212 | 3bf300931d073f901908813216d139c9ef9c1b4a | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 574 | 16 | self.assertFalse | test_has_ipv6_enabled_but_fails | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | _has_ipv6('::1')) | added | 16daeed9bc2a793dde28dd76f9b310f46588330ef44932c59341638121232d42 | self.assertFalse|test_has_ipv6_enabled_but_fails|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _... | null | null | null |
urllib3/urllib3 | train | 212 | 3bf300931d073f901908813216d139c9ef9c1b4a | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 581 | 16 | self.assertTrue | test_has_ipv6_enabled_and_working | import hashlib
import warnings
import logging
import io
import unittest
import ssl
import socket
from itertools import chain
from mock import patch, Mock
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.retry import Retry... | _has_ipv6('::1')) | added | bd0a06e39c105172d0a396110695554a64620c5d64f74566659cfc2b384c0571 | self.assertTrue|test_has_ipv6_enabled_and_working|import hashlib import warnings import logging import io import unittest import ssl import socket from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, ... | null | null | null |
urllib3/urllib3 | train | 214 | f52981d572c3fd6acfb1eb1d51975f2bb5b6126d | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 37 | 8 | self.assertEqual | test_dnsname_to_stdlib_simple | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except ImportError as e:
raise SkipTes... | expected_result) | added | 6dec4b4e4886d3166c22c2b4d2473775a23b8812603f692e53c2f6aca084151e | self.assertEqual|test_dnsname_to_stdlib_simple|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) from ..wi... | null | null | null |
urllib3/urllib3 | train | 214 | f52981d572c3fd6acfb1eb1d51975f2bb5b6126d | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 46 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_period | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except ImportError as e:
raise SkipTes... | expected_result) | added | 2890ff9cec74e11ab1e5c072523b0ce96fadbfe7e822f51956bc3d60013ea527 | self.assertEqual|test_dnsname_to_stdlib_leading_period|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) f... | null | null | null |
urllib3/urllib3 | train | 214 | f52981d572c3fd6acfb1eb1d51975f2bb5b6126d | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 56 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_splat | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except ImportError as e:
raise SkipTes... | expected_result) | added | 56de040d9dbc1becd9b657121c5d90432792850ac6a5c49e0800e1e981022fc7 | self.assertEqual|test_dnsname_to_stdlib_leading_splat|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) fr... | null | null | null |
urllib3/urllib3 | train | 215 | a019621a3da01407033b5fb09a7a9041fceb5954 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 102 | 8 | self.assertEqual | test_decode_deflate | import socket
import sys
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from urllib3... | b'foo') | added | 6f63c1524ce4fc8d807b2202db66a789dadac4da72e9cc114979f4265bdbefb5 | self.assertEqual|test_decode_deflate|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.util.... | null | null | null |
urllib3/urllib3 | train | 215 | a019621a3da01407033b5fb09a7a9041fceb5954 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 111 | 8 | self.assertEqual | test_decode_deflate_case_insensitve | import socket
import sys
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from urllib3... | b'foo') | added | e920845c7ded9b8b8ecec20df19ed5b49e582813ac8a056175726ca410499a53 | self.assertEqual|test_decode_deflate_case_insensitve|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib fr... | null | null | null |
urllib3/urllib3 | train | 215 | a019621a3da01407033b5fb09a7a9041fceb5954 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 379 | 8 | self.assertRaises | test_deflate_streaming | import socket
import sys
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from urllib3... | StopIteration) | added | 607065416f44ad9489059504d9880bb1e864ea06dafa4b2d3c50aef10db3dffc | self.assertRaises|test_deflate_streaming|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from urllib3.u... | null | null | null |
urllib3/urllib3 | train | 215 | a019621a3da01407033b5fb09a7a9041fceb5954 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 614 | 8 | self.assertEqual | test_get_case_insensitive_headers | import socket
import sys
from io import BytesIO, BufferedReader
from urllib3.response import HTTPResponse
from urllib3.exceptions import (
DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader
)
from urllib3.packages.six.moves import http_client as httplib
from urllib3.util.retry import Retry
from urllib3... | 'example.com') | added | 104084a87245d279c09c22bbbc1cf979448aec47b64f17370447f2a35c28e29f | self.assertEqual|test_get_case_insensitive_headers|import socket import sys from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from... | null | null | null |
urllib3/urllib3 | train | 216 | aa69fc97cc06a58c26c123b250caba750fd1f4b2 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 195 | 8 | self.assertEqual | test_get_map | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | [rd.fileno()]) | added | d837c0c4450e49a38d2f9dbdc5cc144fc1fa140ad88a6ecfeae2f018678040ed | self.assertEqual|test_get_map|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest except Import... | null | null | null |
urllib3/urllib3 | train | 216 | aa69fc97cc06a58c26c123b250caba750fd1f4b2 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 263 | 8 | self.assertRaises | test_context_manager | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | RuntimeError) | added | fdaf2d64861e1cb4250bc39c15c621a0d6ddef1f26f6d5205de43276a18eb15a | self.assertRaises|test_context_manager|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest exce... | null | null | null |
urllib3/urllib3 | train | 216 | aa69fc97cc06a58c26c123b250caba750fd1f4b2 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 478 | 12 | self.assertEqual | test_select_interrupt_with_event | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | s.select(LONG_SELECT)) | added | ec73882386660585e00556835a46164a32ea1f175845443e487f77f73cbb5d67 | self.assertEqual|test_select_interrupt_with_event|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import un... | null | null | null |
urllib3/urllib3 | train | 216 | aa69fc97cc06a58c26c123b250caba750fd1f4b2 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 624 | 8 | self.assertEqual | test_wait_for_non_list_iterable | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | wait.wait_for_read(iterable, timeout=SHORT_SELECT)) | added | c6cf4b641d0e334b37ed307dff165a71dfd78cd860b824afa09b1567586d6cce | self.assertEqual|test_wait_for_non_list_iterable|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import uni... | null | null | null |
urllib3/urllib3 | train | 217 | 8b4a204aed33d2533afbbee4922846ae02669d51 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 235 | 8 | self.assertRaises | test_register_bad_event | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | ValueError) | added | 941a28ec516940c62af944bca46247cf244f974750d090e2951f8c80716fcd80 | self.assertRaises|test_register_bad_event|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest e... | null | null | null |
urllib3/urllib3 | train | 217 | 8b4a204aed33d2533afbbee4922846ae02669d51 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 425 | 12 | self.assertEqual | test_select_timeout_none | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | len(s.select(timeout=None))) | modified | 6cf47be21ad27302b9230bc4e6004456dd0de936564652683f558c286325bc60 | self.assertEqual|test_select_timeout_none|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest e... | len(s.select(timeout=None))) | 424 | 12 |
urllib3/urllib3 | train | 217 | 8b4a204aed33d2533afbbee4922846ae02669d51 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 541 | 12 | self.assertRaises | test_select_interrupt_exception | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | AlarmInterrupt) | modified | 8fc5de70377aea88b2c63003dfaaeb50beb2be73373c791d8e62e8cae891b630 | self.assertRaises|test_select_interrupt_exception|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import un... | AlarmInterrupt) | 540 | 12 |
urllib3/urllib3 | train | 217 | 8b4a204aed33d2533afbbee4922846ae02669d51 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 613 | 8 | self.assertEqual | test_wait_for_non_list_iterable | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import socket
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unit... | wait.wait_for_read(iterable, timeout=SHORT_SELECT)) | added | 0144b609b3b4cb3c9a1b2f2d6293abba365b31b733c5d8bd323c638cab6f7148 | self.assertEqual|test_wait_for_non_list_iterable|from __future__ import with_statement import errno import os import psutil import select import signal import socket import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import uni... | null | null | null |
urllib3/urllib3 | train | 218 | b6204d57bcdfc6ff048f1c21647ef324c8a4f39e | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 79 | 8 | self.assertRaises | test_manager_clear | import sys
from urllib3.poolmanager import (
PoolKey,
key_fn_by_scheme,
PoolManager,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
LocationValueError,
)
from urllib3.util import retry, timeout
if sys.version_info >= (2, 7):
import unittest
else:
... | ClosedPoolError) | modified | 54c6643f7741467cf88a0d01d8f5a99feb485728394fb5acf83a90122876c558 | self.assertRaises|test_manager_clear|import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import unitte... | ClosedPoolError) | 80 | 8 |
urllib3/urllib3 | train | 218 | b6204d57bcdfc6ff048f1c21647ef324c8a4f39e | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 101 | 8 | self.assertRaises | test_contextmanager | import sys
from urllib3.poolmanager import (
PoolKey,
key_fn_by_scheme,
PoolManager,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
LocationValueError,
)
from urllib3.util import retry, timeout
if sys.version_info >= (2, 7):
import unittest
else:
... | ClosedPoolError) | modified | 4e2a9a76fbc7a2dd0a8d3b3e7e86aeb3467278e85a38f3608c8800caccdda470 | self.assertRaises|test_contextmanager|import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): import unitt... | ClosedPoolError) | 102 | 8 |
urllib3/urllib3 | train | 218 | b6204d57bcdfc6ff048f1c21647ef324c8a4f39e | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 190 | 8 | self.assertFalse | test_default_pool_key_funcs_copy | import sys
from urllib3.poolmanager import (
PoolKey,
key_fn_by_scheme,
PoolManager,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
LocationValueError,
)
from urllib3.util import retry, timeout
if sys.version_info >= (2, 7):
import unittest
else:
... | p.key_fn_by_scheme is key_fn_by_scheme) | added | a3e765c8df15c258f286e62a33e7af57ac2f69611c8dcdd14d3e00cf9b63a700 | self.assertFalse|test_default_pool_key_funcs_copy|import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): ... | null | null | null |
urllib3/urllib3 | train | 218 | b6204d57bcdfc6ff048f1c21647ef324c8a4f39e | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 320 | 8 | self.assertFalse | test_override_pool_kwargs_url | import sys
from urllib3.poolmanager import (
PoolKey,
key_fn_by_scheme,
PoolManager,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
LocationValueError,
)
from urllib3.util import retry, timeout
if sys.version_info >= (2, 7):
import unittest
else:
... | default_pool.block) | added | be0fcfb3b39ab03f2c52827ca3a1438ebba23e4d9b53e897319890a30d63e397 | self.assertFalse|test_override_pool_kwargs_url|import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_info >= (2, 7): imp... | null | null | null |
urllib3/urllib3 | train | 219 | 67accdaf3b563d8d1dedffe7d4cd9866f4e06338 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 83 | 16 | self.assertRaises | test_conn_closed | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encode_multipart_formdata,
HTTPConnectionPool,
)
fro... | socket.error) | modified | 2a28955b09d198d5d7cd57fee68409c640c68775df896eb8853c79eb4df77095 | self.assertRaises|test_conn_closed|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTP... | socket.error) | 83 | 16 |
urllib3/urllib3 | train | 219 | 67accdaf3b563d8d1dedffe7d4cd9866f4e06338 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 239 | 8 | self.assertEqual | test_urlopen_put | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encode_multipart_formdata,
HTTPConnectionPool,
)
fro... | r.data) | modified | 57fd06c0cafa518dddfc7bfc891f9fbf0f30e1486bd77a1b0b3d7b3e367bc719 | self.assertEqual|test_urlopen_put|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTPC... | r.data) | 239 | 8 |
urllib3/urllib3 | train | 219 | 67accdaf3b563d8d1dedffe7d4cd9866f4e06338 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 309 | 8 | self.assertTrue | test_nagle | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encode_multipart_formdata,
HTTPConnectionPool,
)
fro... | tcp_nodelay_setting) | modified | 01f59af7cf009a532b38e9cacd08bd7b67c3f5808c729a1e13d3a645b8240479 | self.assertTrue|test_nagle|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_formdata, HTTPConnecti... | tcp_nodelay_setting) | 309 | 8 |
urllib3/urllib3 | train | 219 | 67accdaf3b563d8d1dedffe7d4cd9866f4e06338 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 356 | 12 | self.assertEqual | test_connection_error_retries | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import mock
from .. import (
TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES,
)
from ..port_helpers import find_unused_port
from urllib3 import (
encode_multipart_formdata,
HTTPConnectionPool,
)
fro... | NewConnectionError) | modified | 4fdc9129d7ab632e14713741cc8345cb939e894730f891cfae5093778b61b6ab | self.assertEqual|test_connection_error_retries|import io import logging import socket import sys import unittest import time import warnings import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_fo... | NewConnectionError) | 356 | 12 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 235 | 8 | self.assertRaises | test_register_bad_event | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unittest2 import s... | ValueError) | modified | 3cd0b5dc960303448b80dad7729a918841131d5fdb65983baafa9747c1521792 | self.assertRaises|test_register_bad_event|from __future__ import with_statement import errno import os import psutil import select import signal import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest except ImportEr... | ValueError) | 235 | 8 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 239 | 8 | self.assertRaises | test_register_negative_fd | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unittest2 import s... | ValueError) | modified | 2a91a68293a781a987ae4359568a72737e1cc10f8a5dcc189e43e6cbe732715b | self.assertRaises|test_register_negative_fd|from __future__ import with_statement import errno import os import psutil import select import signal import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest except Import... | ValueError) | 239 | 8 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 409 | 12 | self.assertEqual | test_select_many_events | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unittest2 import s... | events) | modified | dd042f2f466f08bb0c01c36eada18530719b7f0c21af383b9d06db5b26108990 | self.assertEqual|test_select_many_events|from __future__ import with_statement import errno import os import psutil import select import signal import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest except ImportErr... | events) | 409 | 12 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 641 | 12 | self.assertEqual | test_interrupt_wait_for_read_no_event | from __future__ import with_statement
import errno
import os
import psutil
import select
import signal
import sys
import time
import threading
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
except ImportError:
from unittest2 import s... | wait.wait_for_read(rd, timeout=LONG_SELECT)) | modified | bf972c1b564f48015a8e2e4ffbca26273c35bf045dc18fcff751d48eab0896d6 | self.assertEqual|test_interrupt_wait_for_read_no_event|from __future__ import with_statement import errno import os import psutil import select import signal import sys import time import threading try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, skipUnless import unittest ex... | wait.wait_for_read(rd, timeout=LONG_SELECT)) | 641 | 12 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 74 | 8 | self.assertEqual | test_verified | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | VerifiedHTTPSConnection) | modified | 9fb268a722375f5a784d0c914bbe1ca2e219b6321ba6739a1dd27f3f3735170f | self.assertEqual|test_verified|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, D... | VerifiedHTTPSConnection) | 73 | 8 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 112 | 16 | self.assertTrue | test_verified_with_context | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | modified | 548fcdfd4f4db1efd876cc5d274e897596ab1981df503e5a5dff0812b51b1b22 | self.assertTrue|test_verified_with_context|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAU... | warn.called) | 111 | 16 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 208 | 12 | self.assertTrue | test_verified_without_ca_certs | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'No root certificates specified' in str(e) or 'certificate verify failed' in str(e)) | modified | b9ffd1541bc00863b4d4cb75a570fd59b24a0d2d8b1c6ebf383069bfd80b1768 | self.assertTrue|test_verified_without_ca_certs|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, D... | 'No root certificates specified' in str(e) or 'certificate verify failed' in str(e)) | 207 | 12 |
urllib3/urllib3 | train | 220 | 1e7174b375546c1a51d3c045f91cc884627a2bf8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 346 | 8 | self.assertRaises | test_verify_none_and_bad_fingerprint | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | SSLError) | modified | e794a5e2d4b96bd01b03d15357757484317b0299be541613b8cbce82b9d918d8 | self.assertRaises|test_verify_none_and_bad_fingerprint|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAU... | SSLError) | 345 | 8 |
urllib3/urllib3 | train | 221 | 74602c635aceb2e86cf3cde2721e0bcde954bca3 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 139 | 8 | self.assertEqual | test_backoff | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | max_backoff) | added | cbc1277e9fcae8e9724ce748c15a50e65cf54f55d7eeaf366f18ccd9cf04cd6f | self.assertEqual|test_backoff|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Test... | null | null | null |
urllib3/urllib3 | train | 221 | 74602c635aceb2e86cf3cde2721e0bcde954bca3 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 174 | 8 | self.assertFalse | test_status_forcelist | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | retry.is_retry('GET', status_code=400)) | added | 44d9cc339e20e32c28e8624ca3e567812509b59309ae00f8d6495a3e820bdddd | self.assertFalse|test_status_forcelist|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unit... | null | null | null |
urllib3/urllib3 | train | 221 | 74602c635aceb2e86cf3cde2721e0bcde954bca3 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 218 | 12 | self.assertTrue | test_error_message | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | isinstance(e.reason, ResponseError)) | added | 25e3678d02011df019fe0093be2bac71d0260470ecd96fb6e91a47fe45b628ca | self.assertTrue|test_error_message|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest... | null | null | null |
urllib3/urllib3 | train | 221 | 74602c635aceb2e86cf3cde2721e0bcde954bca3 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 244 | 8 | self.assertEqual | test_history | import unittest
from urllib3.response import HTTPResponse
from urllib3.packages.six.moves import xrange
from urllib3.util.retry import Retry, RequestHistory
from urllib3.exceptions import (
ConnectTimeoutError,
MaxRetryError,
ReadTimeoutError,
ResponseError,
)
class RetryTest(unittest.TestCase):
... | tuple()) | added | 6a2ed09526ab8a95bb737bed5e500a042e720274de25d6496c0d607c9a2cd6ed | self.assertEqual|test_history|import unittest from urllib3.response import HTTPResponse from urllib3.packages.six.moves import xrange from urllib3.util.retry import Retry, RequestHistory from urllib3.exceptions import ( ConnectTimeoutError, MaxRetryError, ReadTimeoutError, ResponseError, ) class RetryTest(unittest.Test... | null | null | null |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 48 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_period | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except ImportError as e:
raise SkipTes... | expected_result) | modified | 1b8d9aebfa624e17ef27e440ffeaff2740698f31043093dc9221dc325da0155c | self.assertEqual|test_dnsname_to_stdlib_leading_period|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) f... | expected_result) | 46 | 8 |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 58 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_splat | # -*- coding: utf-8 -*-
import unittest
from nose.plugins.skip import SkipTest
try:
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
_dnsname_to_stdlib)
except ImportError as e:
raise SkipTes... | expected_result) | modified | ca910ee26bc2b73bc17b36e852cdcec311bccc64adb9642a73ac688d6eafe78c | self.assertEqual|test_dnsname_to_stdlib_leading_splat|# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, _dnsname_to_stdlib) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) fr... | expected_result) | 56 | 8 |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 62 | 8 | self.assertEqual | test_simple | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | r.data) | modified | f583b1733e7eacce813918e5e47f773a4f2fe44138de421f772712a24844036b | self.assertEqual|test_simple|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEF... | r.data) | 61 | 8 |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 86 | 16 | self.assertTrue | test_verified | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | modified | a294ca12e9f6856add70027d4316054a9c8b0ffe279c9fa3ee0783a964fea6e8 | self.assertTrue|test_verified|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DE... | warn.called) | 85 | 16 |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 525 | 8 | self.assertEqual | test_set_cert_default_cert_required | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'CERT_REQUIRED') | added | bfbc02d5d6e814c24ef836e582d8b7908475936a3190d274c0156c5bc02376e5 | self.assertEqual|test_set_cert_default_cert_required|import datetime import logging import ssl import sys import unittest import warnings import mock from nose.plugins.skip import SkipTest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT... | null | null | null |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 58 | 8 | self.assertEqual | test_multi_setcookie | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
ReadTim... | ['foo=1', 'bar=1']) | modified | 690704e70f1ef58fef9aa60863b8e1cf19d97c61c89abcfa58d76030be83aea4 | self.assertEqual|test_multi_setcookie|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, ProxyE... | ['foo=1', 'bar=1']) | 58 | 8 |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 472 | 8 | self.assertRaises | test_incomplete_response | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
ReadTim... | ProtocolError) | added | 82784acc6792d1f7644eb1d0367a77a9cca0462e55f84ec208d4646cf16b9c66 | self.assertRaises|test_incomplete_response|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import ( MaxRetryError, P... | null | null | null |
urllib3/urllib3 | train | 222 | 4fc0be786662dc5b79bf7e939eedd653c78d4616 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,093 | 8 | self.assertEqual | test_headers_are_sent_with_the_original_case | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
from urllib3 import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.poolmanager import proxy_from_url
from urllib3.exceptions import (
MaxRetryError,
ProxyError,
ReadTim... | parsed_headers) | added | 4bedda3390556b9be26b710000f59f80b107bedffbc7dfccfe6ded600860db9f | self.assertEqual|test_headers_are_sent_with_the_original_case|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. from urllib3 import HTTPConnectionPool, HTTPSConnectionPool from urllib3.poolmanager import proxy_from_url from urllib3.exceptions import... | null | null | null |
urllib3/urllib3 | train | 223 | d0214f3008a36928e44b3e573ebc844995235b35 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 191 | 8 | self.assertFalse | test_default_pool_key_funcs_copy | import socket
import sys
from urllib3.poolmanager import (
PoolKey,
key_fn_by_scheme,
PoolManager,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
LocationValueError,
)
from urllib3.util import retry, timeout
if sys.version_info >= (2, 7):
import uni... | p.key_fn_by_scheme is key_fn_by_scheme) | modified | 232b8411bdf16ce7410065e3e349da2ee838ab1d7eae3c93339e67669272fd74 | self.assertFalse|test_default_pool_key_funcs_copy|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if sys.version_in... | p.key_fn_by_scheme is key_fn_by_scheme) | 190 | 8 |
urllib3/urllib3 | train | 223 | d0214f3008a36928e44b3e573ebc844995235b35 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 277 | 8 | self.assertTrue | test_http_connection_from_host_case_insensitive | import socket
import sys
from urllib3.poolmanager import (
PoolKey,
key_fn_by_scheme,
PoolManager,
)
from urllib3 import connection_from_url
from urllib3.exceptions import (
ClosedPoolError,
LocationValueError,
)
from urllib3.util import retry, timeout
if sys.version_info >= (2, 7):
import uni... | pool is other_pool) | modified | d0eb4cdf16e499b1a44c5174662337849c5ae92eadf0253472565ad851c7364b | self.assertTrue|test_http_connection_from_host_case_insensitive|import socket import sys from urllib3.poolmanager import ( PoolKey, key_fn_by_scheme, PoolManager, ) from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, LocationValueError, ) from urllib3.util import retry, timeout if ... | pool is other_pool) | 276 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.