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 | 245 | bf5b620aa4eec99dd16734ed21901ebd5702ce89 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,334 | 8 | self.assertEqual | test_empty_head_response_does_not_hang | # 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... | list(r.stream())) | modified | be268b148db6a26255bfa90f668e4f998511ddf79bd1dd4c39dde4b9adafe276 | self.assertEqual|test_empty_head_response_does_not_hang|# 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 ( Max... | list(r.stream())) | 1,336 | 8 |
urllib3/urllib3 | train | 246 | 9990eccd005cfc3e491c2665eafc373ac41bc195 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 272 | 12 | self.assertEqual | test_correct_header_line | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | b'example.com') | modified | 3fb8b562dacc41422bb879f53d1861377ee0d7ad464846dd7d6017bdde08b413 | self.assertEqual|test_correct_header_line|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 import pytest try: import ssl from... | b'example.com') | 272 | 12 |
urllib3/urllib3 | train | 246 | 9990eccd005cfc3e491c2665eafc373ac41bc195 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 309 | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | ConnectTimeoutError) | modified | ac2c89b8ae3832eaf0edfaef3c5724a18a6969b5dca00acaba6561ddced06719 | 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 import pytest try: import ssl fro... | ConnectTimeoutError) | 309 | 8 |
urllib3/urllib3 | train | 246 | 9990eccd005cfc3e491c2665eafc373ac41bc195 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 351 | 8 | self.assertRaises | test_proxy_rejection | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | NewConnectionError) | modified | fa1ff16a2b7bc7b95cf39e0782f1f5669ea0bfeea0d22cf5b8a26221114abd11 | self.assertRaises|test_proxy_rejection|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 import pytest try: import ssl from ur... | NewConnectionError) | 351 | 8 |
urllib3/urllib3 | train | 246 | 9990eccd005cfc3e491c2665eafc373ac41bc195 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 366 | 12 | self.assertEqual | test_socks_with_password | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | '16.17.18.19') | modified | b5d4f496e43e0a0e4e1804dc4f0127b0b1ad93440cc0bbb042fc746a42acc0c6 | self.assertEqual|test_socks_with_password|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 import pytest try: import ssl from... | '16.17.18.19') | 366 | 12 |
urllib3/urllib3 | train | 247 | 552ae3cc83367af0a6268851d41bf42038480719 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 170 | 8 | assert | test_default_pool_key_funcs_copy | import socket
import pytest
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
class TestPoolManager(object):
def t... | p.key_fn_by_scheme | added | 0a3efe4481cbf5b1428617acca9a4e437633c17f243facd5495aea6be1300132 | assert|test_default_pool_key_funcs_copy|import socket import pytest 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 class TestPoolManager(ob... | null | null | null |
urllib3/urllib3 | train | 247 | 552ae3cc83367af0a6268851d41bf42038480719 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 207 | 8 | assert | test_https_connection_from_url_case_insensitive | import socket
import pytest
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
class TestPoolManager(object):
def t... | len(p.pools) | added | d38ccf0e27b46dba574973f11206c90413d09da116d36f3114ca430f5da30ec8 | assert|test_https_connection_from_url_case_insensitive|import socket import pytest 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 class Tes... | null | null | null |
urllib3/urllib3 | train | 247 | 552ae3cc83367af0a6268851d41bf42038480719 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 258 | 8 | assert | test_assert_hostname_and_fingerprint_flag | import socket
import pytest
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
class TestPoolManager(object):
def t... | len(p.pools) | added | 2ee2e8f69efc09183716045e449f2d8484458ff06b9f974b2581ccef030c6529 | assert|test_assert_hostname_and_fingerprint_flag|import socket import pytest 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 class TestPoolM... | null | null | null |
urllib3/urllib3 | train | 247 | 552ae3cc83367af0a6268851d41bf42038480719 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 317 | 8 | assert | test_override_pool_kwargs_host | import socket
import pytest
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
class TestPoolManager(object):
def t... | default_pool.retries | added | b46f9205bbaacb1ea7404e9ce1b96b511dd70795ce60c8d469214fe4549df19f | assert|test_override_pool_kwargs_host|import socket import pytest 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 class TestPoolManager(obje... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 200 | 13 | pytest.raises | test_invalid_socks_version_is_valueerror | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | ValueError) | added | 89d54ebfd8db01ed71ca588e8dcb34162b68853b77b0017cb714526aa827f28a | pytest.raises|test_invalid_socks_version_is_valueerror|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 import pytest try: im... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 434 | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | '16.17.18.19') | added | 07b43ef2337d5acae180dd4f57cfe408fdf1aa6848a2ea602926233b3df01363 | 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 import pytest try: import ssl fro... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 505 | 12 | self.assertEqual | test_local_dns | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | '127.0.0.1') | added | 7d8f3ee682cf0fe458cbdcf29038996d016b1c618336f8b400a23fb6906b25cf | self.assertEqual|test_local_dns|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 import pytest try: import ssl from urllib3.u... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 261 | 8 | assert | test_getlist | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
d[i] = str(i)
... | ['asdf'] | added | 7e9abd29e5fb6b4d97b96fbef89052ca7f0278d187d441fbc5fc4ef5783cf9d3 | assert|test_getlist|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) == 5 for i in xran... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 322 | 8 | assert | test_dict_conversion | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
d[i] = str(i)
... | dict(HTTPHeaderDict(hdict)) | added | af6d16f3af88d260e6a777933004243fc0115dc9df59a3a0de6a1714d0e4cd5a | assert|test_dict_conversion|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) == 5 for i... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 331 | 13 | pytest.raises | test_string_enforcement | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in xrange(5):
d[i] = str(i)
... | Exception) | added | 3fb252878f07d202d790fb3622dc4b20c4e109b9870cd1b6e36fa9219c7adbfe | pytest.raises|test_string_enforcement|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d[i] = str(i) assert len(d) ... | null | null | null |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 311 | 8 | assert | test_add_stderr_logger | import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.response import asse... | logger.handlers | modified | 753798dab844590cf777564dd67d67a30bb720f870632e702d0d399a50adccff | assert|test_add_stderr_logger|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urlli... | logger.handlers | 310 | 8 |
urllib3/urllib3 | train | 248 | 769898e3604ee0ad05e5b25fd950a615b60543df | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 544 | 12 | assert | test_ip_family_ipv6_enabled | import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.response import asse... | socket.AF_UNSPEC | modified | 340adb7cadc24c9760d63111e84888e514b59cc2464f3bbcefa47b6e4d3a234f | assert|test_ip_family_ipv6_enabled|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from ... | socket.AF_UNSPEC | 543 | 12 |
urllib3/urllib3 | train | 249 | a72275c83a05df64156ff1ab89044ac8e649c80f | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 71 | 8 | self.assertEqual | test_set_ssl_version_to_tlsv1 | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | r.data) | modified | 4416cc9c0ff79ac0a0e8cc02e2333e9399aa0a8e5f32bff7e46c699fdb17530b | self.assertEqual|test_set_ssl_version_to_tlsv1|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD... | r.data) | 68 | 8 |
urllib3/urllib3 | train | 249 | a72275c83a05df64156ff1ab89044ac8e649c80f | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 119 | 16 | self.assertTrue | test_verified | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | added | b6e8e87190d8b0b20ce37b01b4c64dae07b3bdfb6a11ada674b2c1b03455510e | self.assertTrue|test_verified|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS, ... | null | null | null |
urllib3/urllib3 | train | 249 | a72275c83a05df64156ff1ab89044ac8e649c80f | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 146 | 16 | self.assertTrue | test_verified_with_context | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | added | 29731ca8d14654ea6d8893c702c338dbca10d1b5877bdeb37d95f56a93c77ffa | self.assertTrue|test_verified_with_context|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DE... | null | null | null |
urllib3/urllib3 | train | 249 | a72275c83a05df64156ff1ab89044ac8e649c80f | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 242 | 12 | self.assertTrue | test_verified_without_ca_certs | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'No root certificates specified' in str(e.reason) or 'certificate verify failed' in str(e.reason) or 'invalid certificate chain' in str(e.reason)) | added | a8012d900081dd2c7db51bde5e7adb0dc8ee99df93205d25d7cf8532757f194e | self.assertTrue|test_verified_without_ca_certs|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD... | null | null | null |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 93 | 16 | self.assertEqual | import sys
import threading
import pytest
from tornado import ioloop, web
from dummyserver.server import (
SocketServerThread,
run_tornado_app,
run_loop_in_thread,
DEFAULT_CERTS,
HAS_IPV6,
)
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
if sys.version_info... | expected_value) | added | 6e084938c33e9a5b860f56f70ba6e3cedcf6b7e81f74005f6bc122504b09a495 | self.assertEqual||import sys import threading import pytest from tornado import ioloop, web from dummyserver.server import ( SocketServerThread, run_tornado_app, run_loop_in_thread, DEFAULT_CERTS, HAS_IPV6, ) from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler if sys.version_info >= (... | null | null | null | |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 94 | 8 | self.assertIn | import sys
import threading
import pytest
from tornado import ioloop, web
from dummyserver.server import (
SocketServerThread,
run_tornado_app,
run_loop_in_thread,
DEFAULT_CERTS,
HAS_IPV6,
)
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
if sys.version_info... | header_titles) | added | add4d5c3364ff24fc352f062c288e6e62c1abc1c99553d0aeb30962a98c4f452 | self.assertIn||import sys import threading import pytest from tornado import ioloop, web from dummyserver.server import ( SocketServerThread, run_tornado_app, run_loop_in_thread, DEFAULT_CERTS, HAS_IPV6, ) from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler if sys.version_info >= (2, ... | null | null | null | |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 282 | 13 | pytest.raises | test_contextmanager | from __future__ import absolute_import
import pytest
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_cli... | ClosedPoolError) | modified | 201d702c94e420a96dc6c8c1918e3a0b72038909ec6050c818efc24ffce06d1d | pytest.raises|test_contextmanager|from __future__ import absolute_import import pytest 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.si... | ClosedPoolError) | 280 | 13 |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 237 | 8 | assert | test_https_connection_from_context_case_insensitive | import socket
import pytest
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
class TestPoolManager(object):
def t... | len(p.pools) | added | 93d88edc689531cabe112420267393fa7ef2fc904b14370aded94d20daf5168e | assert|test_https_connection_from_context_case_insensitive|import socket import pytest 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 class... | null | null | null |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 538 | 12 | self.assertEqual | test_ssl_wrong_system_time | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warning.category) | added | b2e7be97a0ceb440fe04d0846eac7312d98cd1735fee0e61221b2b79b30d74df | self.assertEqual|test_ssl_wrong_system_time|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, D... | null | null | null |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 588 | 12 | self.assertTrue | test_warning_for_certs_without_a_san | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | added | 2d80e35fd6ad4037a488d57ad41bce2d4de61b1c5c0ece90a3b1b20c5a848627 | self.assertTrue|test_warning_for_certs_without_a_san|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_... | null | null | null |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,351 | 8 | self.assertEqual | test_chunked_head_response_does_not_hang | # 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... | list(r.stream())) | added | 79634fcd6d0f938a7f62d80f9a768279bf275128765e23e70dd48a3ab66b44db | self.assertEqual|test_chunked_head_response_does_not_hang|# 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 ( M... | null | null | null |
urllib3/urllib3 | train | 250 | da05fe2497e18b367cab159195a1ace9a74119e3 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,395 | 8 | self.assertEqual | test_stream_none_unchunked_response_does_not_hang | # 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... | list(r.stream(None))) | added | 0551274262220d33477f8a3ba87d96664212eaf71a3e4b4c95db211fce8296a2 | self.assertEqual|test_stream_none_unchunked_response_does_not_hang|# 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 i... | null | null | null |
urllib3/urllib3 | train | 252 | 646189be7d14f44f53ec16de84fcef31c0e7f41e | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 284 | 13 | pytest.raises | test_no_host | from __future__ import absolute_import
import pytest
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_cli... | LocationValueError) | added | 797880c86e842ec86cf09df9e9ddc7fb433030226742532f4b9433d0700cda3b | pytest.raises|test_no_host|from __future__ import absolute_import import pytest 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... | null | null | null |
urllib3/urllib3 | train | 252 | 646189be7d14f44f53ec16de84fcef31c0e7f41e | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 315 | 12 | assert | test_ca_certs_default_cert_required | from __future__ import absolute_import
import pytest
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_cli... | 'CERT_REQUIRED' | added | ffc7c64123d820fb282b035864818fd626f97b0a7dd6580421e57bbeca3ad474 | assert|test_ca_certs_default_cert_required|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.pa... | null | null | null |
urllib3/urllib3 | train | 252 | 646189be7d14f44f53ec16de84fcef31c0e7f41e | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 386 | 16 | assert | _test | from __future__ import absolute_import
import pytest
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_cli... | None | added | 33221574244b2235bb8bd47a4e910623a23140d59e7c121fff98c3c66092c0d2 | assert|_test|from __future__ import absolute_import import pytest 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 i... | null | null | null |
urllib3/urllib3 | train | 252 | 646189be7d14f44f53ec16de84fcef31c0e7f41e | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 415 | 12 | assert | test_custom_http_response_class | from __future__ import absolute_import
import pytest
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_cli... | isinstance(response, CustomHTTPResponse) | added | 91b512387d7aa180bf89b48fd44c53c6c3ce98baf7629d6015d4f2a2a5d12a73 | assert|test_custom_http_response_class|from __future__ import absolute_import import pytest from urllib3.connectionpool import ( connection_from_url, HTTPConnection, HTTPConnectionPool, HTTPSConnectionPool, ) from urllib3.response import httplib, HTTPResponse from urllib3.util.timeout import Timeout from urllib3.packag... | null | null | null |
urllib3/urllib3 | train | 253 | d9898fb39e6c6037dea12d7226813d35b40f0947 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 51 | 8 | assert | test_same_key | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in ... | ['foo'] | modified | 38235dfba1e7c23fb309fe916ded302b2ce0bc5ad1bb056e26382f5dc78b14d2 | assert|test_same_key|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): ... | ['foo'] | 50 | 8 |
urllib3/urllib3 | train | 253 | d9898fb39e6c6037dea12d7226813d35b40f0947 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 240 | 8 | assert | test_extend_from_headerdict | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in ... | 'foofoo' | modified | c13f75cc4c7d4a8764eff19582453116a874e07638d91f5ec0d9523f2479b58c | assert|test_extend_from_headerdict|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i ... | 'foofoo' | 239 | 8 |
urllib3/urllib3 | train | 253 | d9898fb39e6c6037dea12d7226813d35b40f0947 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 258 | 8 | assert | test_getlist | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in ... | ['foo', 'bar'] | modified | 2b229abedfaf4cbf7a0ede2ebb111302f143bd57e162d6b39c416a3b8ee215ff | assert|test_getlist|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xrange(5): d... | ['foo', 'bar'] | 257 | 8 |
urllib3/urllib3 | train | 253 | d9898fb39e6c6037dea12d7226813d35b40f0947 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 362 | 8 | assert | test_from_httplib_py2 | from urllib3._collections import (
HTTPHeaderDict,
RecentlyUsedContainer as Container
)
import pytest
from urllib3.exceptions import InvalidHeader
from urllib3.packages import six
xrange = six.moves.xrange
class TestLRUContainer(object):
def test_maxsize(self):
d = Container(5)
for i in ... | ['asdf', 'bla'] | modified | 17780ad982546f36109402110193df27f44d923bfcd7bb92d7e9f961ab7c764d | assert|test_from_httplib_py2|from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) import pytest from urllib3.exceptions import InvalidHeader from urllib3.packages import six xrange = six.moves.xrange class TestLRUContainer(object): def test_maxsize(self): d = Container(5) for i in xra... | ['asdf', 'bla'] | 361 | 8 |
urllib3/urllib3 | train | 254 | db1c1b6ade859120469c45de479bcac758ab173e | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 113 | 8 | assert | test_decode_deflate_case_insensitve | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | b'foo' | modified | d0c648b3e41192d82a9379c42ac493b28e68c078a599a17a14bcd74420636544 | assert|test_decode_deflate_case_insensitve|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_cli... | b'foo' | 114 | 8 |
urllib3/urllib3 | train | 254 | db1c1b6ade859120469c45de479bcac758ab173e | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 307 | 8 | assert | test_io_readinto | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | barr | added | 8dc6f57ee3cdbb5fd46bc03f331e83ea094dcbf98cca635f84a2038f51f03a34 | assert|test_io_readinto|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock 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 | 254 | db1c1b6ade859120469c45de479bcac758ab173e | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 634 | 8 | assert | test_chunked_response_without_crlf_on_end | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | list(resp.stream()) | added | 7661183f202d1f80b7dd76a12f3178989a0a070bcf611242ce5586604df38f39 | assert|test_chunked_response_without_crlf_on_end|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import ht... | null | null | null |
urllib3/urllib3 | train | 254 | db1c1b6ade859120469c45de479bcac758ab173e | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 644 | 8 | assert | test_chunked_response_with_extensions | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | list(resp.stream()) | added | b50436d50c28710bc6ae22ac22628e30e36198eae9dfc32afb7a7e934c3b9734 | assert|test_chunked_response_with_extensions|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_c... | null | null | null |
urllib3/urllib3 | train | 255 | 835b9b299fff5cb3eca8cfb52022f02728384dc5 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 309 | 8 | assert | test_io_readinto | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | barr | modified | 0f5a0b462bfdb6dd3b3c32c2fcaae57a5a6817621e34a83b6204b1e6652ed338 | assert|test_io_readinto|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from... | barr | 307 | 8 |
urllib3/urllib3 | train | 255 | 835b9b299fff5cb3eca8cfb52022f02728384dc5 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 350 | 8 | assert | test_gzipped_streaming | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | b'oo' | modified | 6c7065233e58ebbd01d6961ab3c7a01aa518af37455f52bc2a63281f64ec56f8 | assert|test_gzipped_streaming|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httpli... | b'oo' | 348 | 8 |
urllib3/urllib3 | train | 255 | 835b9b299fff5cb3eca8cfb52022f02728384dc5 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 435 | 13 | pytest.raises | test_deflate_streaming | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | StopIteration) | modified | 15e4752eeaf030ad257cec0e1d4af777d5885478036197e591f60ec671441fff | pytest.raises|test_deflate_streaming|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as... | StopIteration) | 433 | 13 |
urllib3/urllib3 | train | 255 | 835b9b299fff5cb3eca8cfb52022f02728384dc5 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 598 | 8 | assert | test_mock_transfer_encoding_chunked_custom_read | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | response | modified | 3b68793cbebc46f9b188d846a6413f626ad4bd4be81388e2744dab2337ac1a08 | assert|test_mock_transfer_encoding_chunked_custom_read|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves imp... | response | 596 | 8 |
urllib3/urllib3 | train | 256 | 63b088b245cd102b5352304cd407309801f0b2e9 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 245 | 8 | self.assertRaises | test_register_invalid_fileobj | from __future__ import with_statement
import errno
import os
import psutil
import mock
import select
import signal
import sys
import time
import threading
from . import onlyPy34OrOlder
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
excep... | ValueError) | modified | 39e757295f9aed030e646c7695a7ec4575fb0d99982b320b3e7a3158a8a8fb00 | self.assertRaises|test_register_invalid_fileobj|from __future__ import with_statement import errno import os import psutil import mock import select import signal import sys import time import threading from . import onlyPy34OrOlder try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import sk... | ValueError) | 243 | 8 |
urllib3/urllib3 | train | 256 | 63b088b245cd102b5352304cd407309801f0b2e9 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 325 | 8 | self.assertEqual | test_unregister_after_reuse_fd | from __future__ import with_statement
import errno
import os
import psutil
import mock
import select
import signal
import sys
import time
import threading
from . import onlyPy34OrOlder
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
excep... | len(s.get_map())) | modified | 9cbb77b056ca2388c823399e06fdf8fe1a66e5069884748683e17c825aba60d4 | self.assertEqual|test_unregister_after_reuse_fd|from __future__ import with_statement import errno import os import psutil import mock import select import signal import sys import time import threading from . import onlyPy34OrOlder try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import sk... | len(s.get_map())) | 323 | 8 |
urllib3/urllib3 | train | 256 | 63b088b245cd102b5352304cd407309801f0b2e9 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 411 | 12 | self.assertEqual | test_select_many_events | from __future__ import with_statement
import errno
import os
import psutil
import mock
import select
import signal
import sys
import time
import threading
from . import onlyPy34OrOlder
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
excep... | events) | modified | d655972a6dfd9a0face50ec5401565a37600bac01ba4e137df0f97f6e412edb2 | self.assertEqual|test_select_many_events|from __future__ import with_statement import errno import os import psutil import mock import select import signal import sys import time import threading from . import onlyPy34OrOlder try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import skipIf, s... | events) | 409 | 12 |
urllib3/urllib3 | train | 256 | 63b088b245cd102b5352304cd407309801f0b2e9 | train | test/test_selectors.py | train | urllib3/urllib3:test/test_selectors.py | 615 | 8 | self.assertEqual | test_wait_for_non_list_iterable | from __future__ import with_statement
import errno
import os
import psutil
import mock
import select
import signal
import sys
import time
import threading
from . import onlyPy34OrOlder
try: # Python 2.6 unittest module doesn't have skip decorators.
from unittest import skipIf, skipUnless
import unittest
excep... | wait.wait_for_read(iterable, timeout=SHORT_SELECT)) | modified | cdb96a5bea5ef02738e978d17dfdfac38a69ce45384a70c342f550d102e4297b | self.assertEqual|test_wait_for_non_list_iterable|from __future__ import with_statement import errno import os import psutil import mock import select import signal import sys import time import threading from . import onlyPy34OrOlder try: # Python 2.6 unittest module doesn't have skip decorators. from unittest import s... | wait.wait_for_read(iterable, timeout=SHORT_SELECT)) | 613 | 8 |
urllib3/urllib3 | train | 257 | 560bd227b90f74417ffaedebf5f8d05a8ee4f532 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 256 | 8 | assert | test_retry_default_remove_headers_on_redirect | import pytest
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 TestRetry(object):
def test_str... | ['Authorization'] | added | 5efc93722ef08d5405d6bdcc474ceaead183cf7fe06dd54811a1cceac0daaac7 | assert|test_retry_default_remove_headers_on_redirect|import pytest 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 Te... | null | null | null |
urllib3/urllib3 | train | 257 | 560bd227b90f74417ffaedebf5f8d05a8ee4f532 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 261 | 8 | assert | test_retry_set_remove_headers_on_redirect | import pytest
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 TestRetry(object):
def test_str... | ['X-API-Secret'] | added | e08a9064545dab20e454c5afbce854ad6cdfff943152478cd9674ba14bff9dfc | assert|test_retry_set_remove_headers_on_redirect|import pytest 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 TestRe... | null | null | null |
urllib3/urllib3 | train | 257 | 560bd227b90f74417ffaedebf5f8d05a8ee4f532 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 219 | 8 | self.assertEqual | test_missing_port | import unittest
import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import (HTTPDummyServerTestCase,
IPv6HTTPDummyServerTestCase)
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.excepti... | b'Dummy server!') | added | 7504a98cf97669c04e493da5ece24a171842b59961dc673ad3d87c27a85f958e | self.assertEqual|test_missing_port|import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptio... | null | null | null |
urllib3/urllib3 | train | 257 | 560bd227b90f74417ffaedebf5f8d05a8ee4f532 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 244 | 8 | self.assertEqual | test_headers | import unittest
import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import (HTTPDummyServerTestCase,
IPv6HTTPDummyServerTestCase)
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.excepti... | 'quux') | added | 25de49c410be14c25de5a63a5efe573af89cac933888913cfe06a2ccf8e52556 | self.assertEqual|test_headers|import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions im... | null | null | null |
urllib3/urllib3 | train | 257 | 560bd227b90f74417ffaedebf5f8d05a8ee4f532 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 249 | 8 | self.assertEqual | test_headers | import unittest
import json
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import (HTTPDummyServerTestCase,
IPv6HTTPDummyServerTestCase)
from urllib3.poolmanager import PoolManager
from urllib3.connectionpool import port_by_scheme
from urllib3.excepti... | 'quux') | added | 3a46468a8ece4540060f629f53ffa1d2a4929fc7bdb37dbc64e3abdc9bdfcb87 | self.assertEqual|test_headers|import unittest import json import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import (HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase) from urllib3.poolmanager import PoolManager from urllib3.connectionpool import port_by_scheme from urllib3.exceptions im... | null | null | null |
urllib3/urllib3 | train | 258 | 0a01e691e082191f5abef5878937de7af1a2407c | train | test/appengine/test_gae_manager.py | test | urllib3/urllib3:test/appengine/test_gae_manager.py | 136 | 8 | self.assertRaises | test_exceptions | import dummyserver.testcase
import pytest
from urllib3.contrib import appengine
import urllib3.exceptions
import urllib3.util.url
import urllib3.util.retry
from test.with_dummyserver import test_connectionpool
# This class is used so we can re-use the tests from the connection pool.
# It proxies all requests to the... | urllib3.exceptions.SSLError) | modified | 4b8909d1e80b3c318d717790b0c1e9d020683c2280db1d35cfb9895bba077925 | self.assertRaises|test_exceptions|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connection pool. # ... | urllib3.exceptions.SSLError) | 134 | 8 |
urllib3/urllib3 | train | 258 | 0a01e691e082191f5abef5878937de7af1a2407c | train | test/appengine/test_gae_manager.py | test | urllib3/urllib3:test/appengine/test_gae_manager.py | 168 | 8 | self.assertEqual | test_retry_return_in_response | import dummyserver.testcase
import pytest
from urllib3.contrib import appengine
import urllib3.exceptions
import urllib3.util.url
import urllib3.util.retry
from test.with_dummyserver import test_connectionpool
# This class is used so we can re-use the tests from the connection pool.
# It proxies all requests to the... | (urllib3.util.retry.RequestHistory( 'GET', self.pool._absolute_url('/successful_retry'), None, 418, None),)) | modified | e856e6b20cb7f89a9cba75626e0677e41ad699ac8f68563af9b36584e677ca2a | self.assertEqual|test_retry_return_in_response|import dummyserver.testcase import pytest from urllib3.contrib import appengine import urllib3.exceptions import urllib3.util.url import urllib3.util.retry from test.with_dummyserver import test_connectionpool # This class is used so we can re-use the tests from the connec... | (urllib3.util.retry.RequestHistory( 'GET', self.pool._absolute_url('/successful_retry'), None, 418, None),)) | 166 | 8 |
urllib3/urllib3 | train | 258 | 0a01e691e082191f5abef5878937de7af1a2407c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 84 | 16 | self.assertRaises | test_conn_closed | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import pytest
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,
HTTPConnect... | socket.error) | modified | 95f2e3c32ee2c0ce505de66fe7bbac457b1146bf53e27ccabd8efa075f6eb0c1 | self.assertRaises|test_conn_closed|import io import logging import socket import sys import unittest import time import warnings import pytest import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_... | socket.error) | 83 | 16 |
urllib3/urllib3 | train | 258 | 0a01e691e082191f5abef5878937de7af1a2407c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 138 | 8 | self.assertRaises | test_timeout | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import pytest
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,
HTTPConnect... | ReadTimeoutError) | modified | b9829aeebc7d3f19ec48efb2ca0617f09f6cd84c06e9c8b3c1c2f14cb7943717 | self.assertRaises|test_timeout|import io import logging import socket import sys import unittest import time import warnings import pytest import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encode_multipart_form... | ReadTimeoutError) | 137 | 8 |
urllib3/urllib3 | train | 258 | 0a01e691e082191f5abef5878937de7af1a2407c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 364 | 12 | self.assertEqual | test_connection_error_retries | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import pytest
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,
HTTPConnect... | NewConnectionError) | modified | 1b6489dd8e3a348629ac028636cff0ccc7ff8c2633c951f492b702cd03353708 | self.assertEqual|test_connection_error_retries|import io import logging import socket import sys import unittest import time import warnings import pytest import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encod... | NewConnectionError) | 363 | 12 |
urllib3/urllib3 | train | 258 | 0a01e691e082191f5abef5878937de7af1a2407c | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,008 | 12 | self.assertTrue | test_redirect_with_failed_tell | import io
import logging
import socket
import sys
import unittest
import time
import warnings
import pytest
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,
HTTPConnect... | 'Unable to record file position for' in str(e)) | added | fa16e529181d485a667f943cd6cc956d2f22d66ff43b6a84531e5359464338bd | self.assertTrue|test_redirect_with_failed_tell|import io import logging import socket import sys import unittest import time import warnings import pytest import mock from .. import ( TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES, ) from ..port_helpers import find_unused_port from urllib3 import ( encod... | null | null | null |
urllib3/urllib3 | train | 259 | 89f4a9d523de648969f77be9e40271ffce904860 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 44 | 8 | self.assertEqual | test_dnsname_to_stdlib_simple | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
... | expected_result) | added | 9078755af6b3be15c010ce480dcf19c24848b83d4692071955c331fe6cd6f252 | self.assertEqual|test_dnsname_to_stdlib_simple|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, get_subj_alt_name, _dn... | null | null | null |
urllib3/urllib3 | train | 259 | 89f4a9d523de648969f77be9e40271ffce904860 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 53 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_period | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
... | expected_result) | added | ad26ec2d0a442d76336d0c6c73ec53d906ff84cff9d3295a723b5a5508be7d4c | self.assertEqual|test_dnsname_to_stdlib_leading_period|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, get_subj_alt_n... | null | null | null |
urllib3/urllib3 | train | 259 | 89f4a9d523de648969f77be9e40271ffce904860 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 63 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_splat | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
... | expected_result) | added | 76f56b3b5ea0aa78c027db1d7216af58720625325614b9a8bf9296837757a4d0 | self.assertEqual|test_dnsname_to_stdlib_leading_splat|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, get_subj_alt_na... | null | null | null |
urllib3/urllib3 | train | 259 | 89f4a9d523de648969f77be9e40271ffce904860 | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 78 | 8 | self.assertTrue | test_get_subj_alt_name | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import (inject_into_urllib3,
extract_from_urllib3,
... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension)) | added | 1bac5ec6780c94725a61af71206d98e56edd5f962c660cc6414042ce37849277 | self.assertTrue|test_get_subj_alt_name|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3, get_subj_alt_name, _dnsname_to... | null | null | null |
urllib3/urllib3 | train | 260 | 30a3f2ad8ca0920198878ac0cb9c2a82002b910d | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 438 | 8 | self.assertEqual | test_socks_with_auth_in_url | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | 'SocksTestServer') | added | bb8845bb777a289d0d406e959631883764ed42f3e003cea9bc3ab542991ff903 | self.assertEqual|test_socks_with_auth_in_url|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 import pytest try: import ssl f... | null | null | null |
urllib3/urllib3 | train | 260 | 30a3f2ad8ca0920198878ac0cb9c2a82002b910d | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 458 | 12 | self.assertTrue | test_socks_with_invalid_password | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | "SOCKS5 authentication failed" in str(e)) | added | 72c679f452198ca8c439de268df87649c13b988220e9d60a583a63331971f098 | self.assertTrue|test_socks_with_invalid_password|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 import pytest try: import s... | null | null | null |
urllib3/urllib3 | train | 260 | 30a3f2ad8ca0920198878ac0cb9c2a82002b910d | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 586 | 12 | self.assertTrue | test_correct_header_line | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | buf.startswith(b'GET / HTTP/1.1')) | added | dd4f637f9376fe57323f11953bc7a8a7ca6abb7bfa6c85b4680d6e103e389e97 | self.assertTrue|test_correct_header_line|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 import pytest try: import ssl from ... | null | null | null |
urllib3/urllib3 | train | 260 | 30a3f2ad8ca0920198878ac0cb9c2a82002b910d | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 620 | 8 | self.assertRaises | test_proxy_rejection | 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
import pytest
try:
import ssl
from urllib3.util import ssl_ as b... | NewConnectionError) | added | 11d2188c20ce10ba31ffd051c2eeff1c66343c8855f1d609675b78dd0238035f | self.assertRaises|test_proxy_rejection|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 import pytest try: import ssl from ur... | null | null | null |
urllib3/urllib3 | train | 261 | 45a39bc6102610c75327d8f6f713d083ae968e6d | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 32 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | # -*- coding: utf-8 -*-
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import (
WrappedSocket, inject_into_urllib3, extract_from_urllib3
)
except ImportError as e:
pytestmark = pytest.mark.skip('Could not import SecureTransport: %r' % e)
from ..... | ssl.SSLError) | added | 5ce4e2fcd5c4e29eb494c389a89fd0f9fd5a60c4d0a951783ffcf96ac7ea977b | pytest.raises|test_no_crash_with_empty_trust_bundle|# -*- coding: utf-8 -*- import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import ( WrappedSocket, inject_into_urllib3, extract_from_urllib3 ) except ImportError as e: pytestmark = pytest.mark.skip('Could not import Secu... | null | null | null |
urllib3/urllib3 | train | 262 | 9782e1f866aa6d0d176dce8678aee448aeb492dd | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 50 | 4 | assert | test_wait_for_socket | import signal
import socket
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_for_socket,
poll_wait_for_s... | wfs(a, read=True, timeout=None) | added | dfd57e74f86cc77945e4b639f93414d3142cb54674dbaddca96e7caefaa78cc8 | assert|test_wait_for_socket|import signal import socket try: from time import monotonic except ImportError: from time import time as monotonic import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, select_wait_for_socket, poll_wait_for_soc... | null | null | null |
urllib3/urllib3 | train | 262 | 9782e1f866aa6d0d176dce8678aee448aeb492dd | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 88 | 4 | assert | test_wait_for_read_write | import signal
import socket
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_for_socket,
poll_wait_for_s... | wait_for_read(a, 0) | added | 803346d4bbfe4b170add57872db1484841b5e2274d05e6f79dc3499e7bd12ca9 | assert|test_wait_for_read_write|import signal import socket try: from time import monotonic except ImportError: from time import time as monotonic import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, select_wait_for_socket, poll_wait_for... | null | null | null |
urllib3/urllib3 | train | 262 | 9782e1f866aa6d0d176dce8678aee448aeb492dd | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 113 | 8 | assert | test_eintr | import signal
import socket
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_for_socket,
poll_wait_for_s... | signal.SIGALRM | added | dd009f197c42086cf33ac82e22b9b97c34c651f56c4b4a2c267ec33bd6b26314 | assert|test_eintr|import signal import socket try: from time import monotonic except ImportError: from time import time as monotonic import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, select_wait_for_socket, poll_wait_for_socket, _have... | null | null | null |
urllib3/urllib3 | train | 262 | 9782e1f866aa6d0d176dce8678aee448aeb492dd | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 118 | 8 | assert | test_eintr | import signal
import socket
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_for_socket,
poll_wait_for_s... | not wfs(a, read=True, timeout=0) | added | c0f02e11c40c0a45fd36063b6755a82fa83a37d6de2a4ad937092eaa6cce3bab | assert|test_eintr|import signal import socket try: from time import monotonic except ImportError: from time import time as monotonic import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, select_wait_for_socket, poll_wait_for_socket, _have... | null | null | null |
urllib3/urllib3 | train | 263 | d3962ce93bc54f2de06c20c97724ac59eae79a63 | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 79 | 9 | pytest.raises | test_wait_for_socket | import signal
import socket
import threading
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import time
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_fo... | Exception) | modified | 5ac5f932e275d41f27f842e601bf298b115704714208509cecf3008524fac7a7 | pytest.raises|test_wait_for_socket|import signal import socket import threading try: from time import monotonic except ImportError: from time import time as monotonic import time import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, selec... | ValueError) | 76 | 9 |
urllib3/urllib3 | train | 263 | d3962ce93bc54f2de06c20c97724ac59eae79a63 | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 86 | 4 | assert | test_wait_for_read_write | import signal
import socket
import threading
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import time
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_fo... | not wait_for_read(a, 0) | modified | 5cc99e58196dbe6b2b8089895836ae5286d2bff4ba31d27390d75c6ecef72109 | assert|test_wait_for_read_write|import signal import socket import threading try: from time import monotonic except ImportError: from time import time as monotonic import time import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, select_w... | not wait_for_read(a, 0) | 83 | 4 |
urllib3/urllib3 | train | 263 | d3962ce93bc54f2de06c20c97724ac59eae79a63 | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 116 | 8 | assert | test_eintr | import signal
import socket
import threading
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import time
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_fo... | signal.SIGALRM | modified | cf43bb034d9e88bc75f55cfc510f6319e6d707e93404e4b527d09f8b979419e1 | assert|test_eintr|import signal import socket import threading try: from time import monotonic except ImportError: from time import time as monotonic import time import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, select_wait_for_socket... | signal.SIGALRM | 113 | 8 |
urllib3/urllib3 | train | 263 | d3962ce93bc54f2de06c20c97724ac59eae79a63 | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 159 | 8 | assert | test_eintr_infinite_timeout | import signal
import socket
import threading
try:
from time import monotonic
except ImportError:
from time import time as monotonic
import time
import pytest
from .socketpair_helper import socketpair
from urllib3.util.wait import (
wait_for_read,
wait_for_write,
wait_for_socket,
select_wait_fo... | not wfs(a, read=True, timeout=0) | added | 35faefdfb8e268a25dd9847ebe4547f67984198c6d9cf303bd6b174303448d16 | assert|test_eintr_infinite_timeout|import signal import socket import threading try: from time import monotonic except ImportError: from time import time as monotonic import time import pytest from .socketpair_helper import socketpair from urllib3.util.wait import ( wait_for_read, wait_for_write, wait_for_socket, selec... | null | null | null |
urllib3/urllib3 | train | 264 | e3493837790e5cd59722585cf4c4339b9a15ff48 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 42 | 12 | assert_* | test_match_hostname_mismatch | import datetime
import mock
import pytest
from urllib3.connection import (
CertificateError,
_match_hostname,
RECENT_DATE
)
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert =... | {'subjectAltName': [('DNS', 'foo')]}) | modified | 957265e27abce734e5c199ee94973a79ba42dc28716293a35ecb006bc45ed269 | assert_*|test_match_hostname_mismatch|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = N... | {'subjectAltName': [('DNS', 'foo')]}) | 42 | 12 |
urllib3/urllib3 | train | 264 | e3493837790e5cd59722585cf4c4339b9a15ff48 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 47 | 12 | assert | test_match_hostname_mismatch | import datetime
import mock
import pytest
from urllib3.connection import (
CertificateError,
_match_hostname,
RECENT_DATE
)
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert =... | cert | modified | bd52d68725edb591dc9d67123f83dbe2b61fec6a3bca6fc67abcda377ff47216 | assert|test_match_hostname_mismatch|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = Non... | cert | 47 | 12 |
urllib3/urllib3 | train | 264 | e3493837790e5cd59722585cf4c4339b9a15ff48 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 55 | 8 | assert | test_recent_date | import datetime
import mock
import pytest
from urllib3.connection import (
CertificateError,
_match_hostname,
RECENT_DATE
)
class TestConnection(object):
"""
Tests in this suite should not make any network requests or connections.
"""
def test_match_hostname_no_cert(self):
cert =... | (datetime.datetime.today() - two_years).date() | modified | 50d5494ff3550f865d23e83f91c81ef9c71551f4189f970f656fefef8c092a15 | assert|test_recent_date|import datetime import mock import pytest from urllib3.connection import ( CertificateError, _match_hostname, RECENT_DATE ) class TestConnection(object): """ Tests in this suite should not make any network requests or connections. """ def test_match_hostname_no_cert(self): cert = None asserted_h... | (datetime.datetime.today() - two_years).date() | 55 | 8 |
urllib3/urllib3 | train | 265 | c7c530705c5504f91f35bbbbed6774076e6d6dd0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 151 | 16 | self.assertFalse | test_verified_with_context | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | warn.called) | modified | 1aadfdfa6d17a9616c291601525fccd7541a4905693ff65d495c8a543e6e068e | self.assertFalse|test_verified_with_context|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, D... | warn.called) | 149 | 16 |
urllib3/urllib3 | train | 265 | c7c530705c5504f91f35bbbbed6774076e6d6dd0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 216 | 12 | self.assertTrue | test_invalid_common_name | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | "doesn't match" in str(e.reason) or "certificate verify failed" in str(e.reason)) | modified | 91b268e4ed596933d477b7867330c54314f33db61ce3b857d7e76a4f6ee50f4f | self.assertTrue|test_invalid_common_name|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFA... | "doesn't match" in str(e.reason) or "certificate verify failed" in str(e.reason)) | 213 | 12 |
urllib3/urllib3 | train | 265 | c7c530705c5504f91f35bbbbed6774076e6d6dd0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 568 | 13 | self.assertRaises | test_discards_connection_on_sslerror | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | MaxRetryError) | added | 9ac99e5adf3b011d52e17b5188cef0cf4061abc8031fca5e869416e72f0b439e | self.assertRaises|test_discards_connection_on_sslerror|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAUL... | null | null | null |
urllib3/urllib3 | train | 265 | c7c530705c5504f91f35bbbbed6774076e6d6dd0 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 577 | 8 | self.assertEqual | test_set_cert_default_cert_required | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | 'CERT_REQUIRED') | added | 7552c8ffd73a013064adb66323cd62cbc6ecd0c58857a8f56a3a602a45cafe27 | self.assertEqual|test_set_cert_default_cert_required|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 51 | 8 | self.assertEqual | test_dnsname_to_stdlib_simple | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from urllib3.contrib.pyopenssl import (
_dnsname_to_stdlib, get_subj_alt_name
)
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
except ImportError:
pass
def setup_modu... | expected_result) | added | b3761bc48ac3129aea849794c66393a0db73b3bd8a77b21de3094bd44be86e4a | self.assertEqual|test_dnsname_to_stdlib_simple|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from urllib3.contrib.pyopenssl import ( _dnsname_to_stdlib, get_subj_alt_name ) from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate except ImportError: pass... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 60 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_period | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from urllib3.contrib.pyopenssl import (
_dnsname_to_stdlib, get_subj_alt_name
)
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
except ImportError:
pass
def setup_modu... | expected_result) | added | 92b45aa1af00b56867760430efac64c100c54dc8b326ce3d9301a03ea74d057f | self.assertEqual|test_dnsname_to_stdlib_leading_period|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from urllib3.contrib.pyopenssl import ( _dnsname_to_stdlib, get_subj_alt_name ) from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate except ImportErr... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 70 | 8 | self.assertEqual | test_dnsname_to_stdlib_leading_splat | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from urllib3.contrib.pyopenssl import (
_dnsname_to_stdlib, get_subj_alt_name
)
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
except ImportError:
pass
def setup_modu... | expected_result) | added | 8281f403e53e91d56d4fa138060009993ac9b9d80190018978d6c8f55f0137ed | self.assertEqual|test_dnsname_to_stdlib_leading_splat|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from urllib3.contrib.pyopenssl import ( _dnsname_to_stdlib, get_subj_alt_name ) from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate except ImportErro... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_pyopenssl.py | train | urllib3/urllib3:test/contrib/test_pyopenssl.py | 85 | 8 | self.assertTrue | test_get_subj_alt_name | # -*- coding: utf-8 -*-
import os
import unittest
import mock
import pytest
try:
from urllib3.contrib.pyopenssl import (
_dnsname_to_stdlib, get_subj_alt_name
)
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
except ImportError:
pass
def setup_modu... | isinstance(mock_warning.call_args[0][1], x509.DuplicateExtension)) | added | ef698b472f36a046fe38b455593c43fa897c7d56fd469ec34037d58a991e7f38 | self.assertTrue|test_get_subj_alt_name|# -*- coding: utf-8 -*- import os import unittest import mock import pytest try: from urllib3.contrib.pyopenssl import ( _dnsname_to_stdlib, get_subj_alt_name ) from cryptography import x509 from OpenSSL.crypto import FILETYPE_PEM, load_certificate except ImportError: pass def set... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 34 | 16 | self.assertRaises | test_inject_validate_fail_cryptography | # -*- coding: utf-8 -*-
import unittest
import pytest
from mock import patch, Mock
try:
from urllib3.contrib.pyopenssl import (
inject_into_urllib3,
extract_from_urllib3
)
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.pyopenssl import inject_into_urll... | ImportError) | added | ff1b348225a17b036acfe2680431ee6b8fa824e8d5c7d3051ee6ce8f71f83b90 | self.assertRaises|test_inject_validate_fail_cryptography|# -*- coding: utf-8 -*- import unittest import pytest from mock import patch, Mock try: from urllib3.contrib.pyopenssl import ( inject_into_urllib3, extract_from_urllib3 ) except ImportError: pass def setup_module(): try: from urllib3.contrib.pyopenssl import inj... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 49 | 16 | self.assertRaises | test_inject_validate_fail_pyopenssl | # -*- coding: utf-8 -*-
import unittest
import pytest
from mock import patch, Mock
try:
from urllib3.contrib.pyopenssl import (
inject_into_urllib3,
extract_from_urllib3
)
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.pyopenssl import inject_into_urll... | ImportError) | added | bb8a58ce88e11b54dfd99c9ee09b5627752335892e51198eb2f6393a5ef0bbd9 | self.assertRaises|test_inject_validate_fail_pyopenssl|# -*- coding: utf-8 -*- import unittest import pytest from mock import patch, Mock try: from urllib3.contrib.pyopenssl import ( inject_into_urllib3, extract_from_urllib3 ) except ImportError: pass def setup_module(): try: from urllib3.contrib.pyopenssl import inject... | null | null | null |
urllib3/urllib3 | train | 266 | a3cf7c8546f8972f522f4f5dd7ee753c4fbf6ccb | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 39 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | # -*- coding: utf-8 -*-
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
exce... | ssl.SSLError) | added | 7c7d04e152ee8f1d873245eae6fff933c7a17fa0ccf058b9061b80ebfc880635 | pytest.raises|test_no_crash_with_empty_trust_bundle|# -*- coding: utf-8 -*- import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module(): try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_int... | null | null | null |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 16 | 4 | assert | test_is_ipaddress_true | import mock
import pytest
from six import b
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize('addr', [
'::1',
'::',
'127.0.0.1',
'8.8.8.8',
b('127.0.0.1')
])
def test_is_ipaddress_true(addr):
assert | ssl_.is_ipaddress(addr) | added | cbff2a24a775806518492da066d85e1ff8d1134dba3adc65f4bb9c0c0b891ce6 | assert|test_is_ipaddress_true|import mock import pytest from six import b from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize('addr', [ '::1', '::', '127.0.0.1', '8.8.8.8', b('127.0.0.1') ]) def test_is_ipaddress_true(addr): assert | null | null | null |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 24 | 4 | assert | test_is_ipaddress_false | import mock
import pytest
from six import b
from urllib3.util import ssl_
from urllib3.exceptions import SNIMissingWarning
@pytest.mark.parametrize('addr', [
'::1',
'::',
'127.0.0.1',
'8.8.8.8',
b('127.0.0.1')
])
def test_is_ipaddress_true(addr):
assert ssl_.is_ipaddress(addr)
@pytest.mark.p... | not ssl_.is_ipaddress(addr) | added | d2b68175bba072cf3c40210bfc0331c1be984bba3e57f69264040555b2413b85 | assert|test_is_ipaddress_false|import mock import pytest from six import b from urllib3.util import ssl_ from urllib3.exceptions import SNIMissingWarning @pytest.mark.parametrize('addr', [ '::1', '::', '127.0.0.1', '8.8.8.8', b('127.0.0.1') ]) def test_is_ipaddress_true(addr): assert ssl_.is_ipaddress(addr) @pytest.mar... | null | null | null |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 517 | 8 | assert | test_const_compare_digest_fallback | import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.response import asse... | not _const_compare_digest_backport(target, prefix) | modified | 7b3f7c91a1a822bdd620c59c22c397b63ebea71b73777cd80f51cde7aaba552e | assert|test_const_compare_digest_fallback|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTEL... | not _const_compare_digest_backport(target, prefix) | 516 | 8 |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 534 | 16 | assert | test_has_ipv6_enabled_but_fails | import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.response import asse... | not _has_ipv6('::1') | modified | afbdd4c2a91b9d7aa99384edd5d61a8a07e22e6f196122a432cbd4e2e6e71c18 | assert|test_has_ipv6_enabled_but_fails|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL f... | not _has_ipv6('::1') | 533 | 16 |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 569 | 8 | assert | test_parse_retry_after | import hashlib
import warnings
import logging
import io
import ssl
import socket
from itertools import chain
from mock import patch, Mock
import pytest
from urllib3 import add_stderr_logger, disable_warnings
from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL
from urllib3.util.response import asse... | expected | modified | 1af1c833d2f0b456ea5e4919caa49025c7f4d95bc04c701fb60826f53c312f37 | assert|test_parse_retry_after|import hashlib import warnings import logging import io import ssl import socket from itertools import chain from mock import patch, Mock import pytest from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers, rewind_body, _FAILEDTELL from urlli... | expected | 568 | 8 |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 368 | 17 | self.assertRaises | _test_request | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | MaxRetryError) | added | f2bcbd922f64c6a26272a92f96f55b70b20a5c2776affcdde0b374340adc4f46 | self.assertRaises|_test_request|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS... | null | null | null |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 434 | 8 | self.assertRaises | test_https_timeout | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | ConnectTimeoutError) | added | 8445919b57bf34ae46447e3428bf84683bd1be7cfacb68164044cf90b5f6b242 | self.assertRaises|test_https_timeout|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_... | null | null | null |
urllib3/urllib3 | train | 267 | db444ec77836ef1e6aa129bc3507f8e838f1ceb6 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 561 | 13 | self.assertRaises | test_discards_connection_on_sslerror | import datetime
import json
import logging
import ssl
import sys
import unittest
import warnings
import mock
import pytest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | MaxRetryError) | added | 69edeb9f3c1532db49c4664125d7df6065022e3c9e8e426a7ce4202fb8029f70 | self.assertRaises|test_discards_connection_on_sslerror|import datetime import json import logging import ssl import sys import unittest import warnings import mock import pytest from dummyserver.testcase import ( HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase ) from dummyserver.server import (DEFAULT_CA, DEFAUL... | null | null | null |
urllib3/urllib3 | train | 268 | 5243c46939e664494e640b8e459d6dad726287ad | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 46 | 8 | assert | test_getheaders | import socket
import zlib
from io import BytesIO, BufferedReader
import pytest
import mock
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.ret... | headers | modified | b8b8c3ed789bbf22a0d429b63934572b96ab7a5cbf9d9e72891c26035b406362 | assert|test_getheaders|import socket import zlib from io import BytesIO, BufferedReader import pytest import mock from urllib3.response import HTTPResponse from urllib3.exceptions import ( DecodeError, ResponseNotChunked, ProtocolError, InvalidHeader ) from urllib3.packages.six.moves import http_client as httplib from ... | headers | 46 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.