repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 386 | 16 | assert | test_server_hostname | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | "localhost" | added | 838503ed98358dc2ea45cb98a0a27490ea2338d9ab7269e02819b8bfc6a780df | assert|test_server_hostname|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, ) fro... | null | null | null |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 452 | 12 | assert | test_https_proxy_timeout | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | ConnectTimeoutError | modified | 94f35703168c28ecc1794f5d39604736f8e8f2389e0a0456cf6ece4a3107a75a | assert|test_https_proxy_timeout|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testcase impo... | ConnectTimeoutError | 450 | 12 |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 489 | 13 | pytest.raises | test_invalid_schema | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | ProxySchemeUnknown, match=error_msg) | modified | bd1be920dd24ed554480194394165da242922ebdca167f12bc48db65afe06576 | pytest.raises|test_invalid_schema|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testcase im... | ProxySchemeUnknown, match=error_msg) | 487 | 13 |
urllib3/urllib3 | train | 492 | 4953f29c0a0d06572708914cf02e22663e08cf55 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 45 | 12 | assert | test_redirect | import gzip
import json
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_... | b"Dummy server!" | modified | 68f26dd942af7c7c13e487dac7a112c9729764a31267a03098bbdd2a210e7d94 | assert|test_redirect|import gzip import json from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connecti... | b"Dummy server!" | 44 | 12 |
urllib3/urllib3 | train | 492 | 4953f29c0a0d06572708914cf02e22663e08cf55 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 109 | 17 | pytest.raises | test_too_many_redirects | import gzip
import json
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_... | MaxRetryError) | modified | 771da05a8826502f4897b93a7f20e82665b750b7c4bafedc5db0856ffdb26609 | pytest.raises|test_too_many_redirects|import gzip import json from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from... | MaxRetryError) | 108 | 17 |
urllib3/urllib3 | train | 492 | 4953f29c0a0d06572708914cf02e22663e08cf55 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 323 | 12 | assert | test_headers | import gzip
import json
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_... | "bar" | modified | ef3f1027dd37049e5d363f3e0161ede075bc98f3cfce0c7a23794a6c656315f2 | assert|test_headers|import gzip import json from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request from urllib3.connectio... | "bar" | 322 | 12 |
urllib3/urllib3 | train | 492 | 4953f29c0a0d06572708914cf02e22663e08cf55 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 419 | 8 | assert | test_top_level_request_with_body | import gzip
import json
from test import LONG_TIMEOUT
from unittest import mock
import pytest
from dummyserver.server import HAS_IPV6
from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase
from urllib3 import HTTPHeaderDict, HTTPResponse, request
from urllib3.connectionpool import port_... | b"test" | modified | 15496ec9bf21632d3f63ed5d36a4d90ab5362820a78a1dd65688a68adb4c9de9 | assert|test_top_level_request_with_body|import gzip import json from test import LONG_TIMEOUT from unittest import mock import pytest from dummyserver.server import HAS_IPV6 from dummyserver.testcase import HTTPDummyServerTestCase, IPv6HTTPDummyServerTestCase from urllib3 import HTTPHeaderDict, HTTPResponse, request fr... | b"test" | 418 | 8 |
urllib3/urllib3 | train | 493 | 0c7a1988237c23a4c70e0e496c49cf3e30e142f5 | train | test/test_no_ssl.py | train | urllib3/urllib3:test/test_no_ssl.py | 34 | 13 | pytest.raises | test_cannot_import_ssl | """
Test what happens if Python was built without SSL
* Everything that does not involve HTTPS should still work
* HTTPS requests must fail with an error that points at the ssl module
"""
import sys
from test import ImportBlocker, ModuleStash
import pytest
ssl_blocker = ImportBlocker("ssl", "_ssl")
module_stash = M... | ImportError) | modified | 3dd838efa0505ed9af1dfd896752a31cbfafe02b30af1ef6f4e29645b8f068f3 | pytest.raises|test_cannot_import_ssl|""" Test what happens if Python was built without SSL * Everything that does not involve HTTPS should still work * HTTPS requests must fail with an error that points at the ssl module """ import sys from test import ImportBlocker, ModuleStash import pytest ssl_blocker = ImportBlocke... | ImportError) | 33 | 13 |
urllib3/urllib3 | train | 493 | 0c7a1988237c23a4c70e0e496c49cf3e30e142f5 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 946 | 13 | pytest.raises | test_parse_url_without_idna | import io
import logging
import socket
import ssl
import sys
import warnings
from itertools import chain
from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli
from unittest.mock import Mock, patch
import pytest
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (... | LocationParseError, match=f"Failed to parse: {url}") | modified | 7c1651e665df0beda0ffe4e1df42ace217ea38f3effa35aa2144d01e2403c990 | pytest.raises|test_parse_url_without_idna|import io import logging import socket import ssl import sys import warnings from itertools import chain from test import ImportBlocker, ModuleStash, notBrotli, onlyBrotli from unittest.mock import Mock, patch import pytest from urllib3 import add_stderr_logger, disable_warning... | LocationParseError, match=f"Failed to parse: {url}") | 945 | 13 |
urllib3/urllib3 | train | 494 | 2adfb315bb9063e24eac62f698f812cf45f5284d | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 35 | 9 | pytest.raises | test_wait_for_socket | import signal
import threading
import time
from socket import socketpair
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_socket,
wait_for_write,
)
@pytest.fixture
def spair():
a, b = socketpair()
... | RuntimeError) | added | 81e0f6da78b74c2727e264b2a3e239a469e92983954c669334f1430ecffa04cc | pytest.raises|test_wait_for_socket|import signal import threading import time from socket import socketpair import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, wait_for_socket, wait_for_write, ) @pytest.fixture def spair(): a, b = socketpair() y... | null | null | null |
urllib3/urllib3 | train | 494 | 2adfb315bb9063e24eac62f698f812cf45f5284d | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 78 | 4 | assert | test_wait_for_read_write | import signal
import threading
import time
from socket import socketpair
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_socket,
wait_for_write,
)
@pytest.fixture
def spair():
a, b = socketpair()
... | not wait_for_read(a, 0) | added | 99eddf8f0d89aac88998612442343ba3eb02a38d66d5264f609a5dde0dab3ad3 | assert|test_wait_for_read_write|import signal import threading import time from socket import socketpair import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, wait_for_socket, wait_for_write, ) @pytest.fixture def spair(): a, b = socketpair() yiel... | null | null | null |
urllib3/urllib3 | train | 494 | 2adfb315bb9063e24eac62f698f812cf45f5284d | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 141 | 8 | assert | test_eintr_zero_timeout | import signal
import threading
import time
from socket import socketpair
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_socket,
wait_for_write,
)
@pytest.fixture
def spair():
a, b = socketpair()
... | not wfs(a, read=True, timeout=0) | modified | 16b130de37f067616110c6f4de57f3bdfc44039786a79ec31bf10e822a94b013 | assert|test_eintr_zero_timeout|import signal import threading import time from socket import socketpair import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, wait_for_socket, wait_for_write, ) @pytest.fixture def spair(): a, b = socketpair() yield... | signal.SIGALRM | 142 | 8 |
urllib3/urllib3 | train | 494 | 2adfb315bb9063e24eac62f698f812cf45f5284d | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 176 | 8 | assert | test_eintr_infinite_timeout | import signal
import threading
import time
from socket import socketpair
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_socket,
wait_for_write,
)
@pytest.fixture
def spair():
a, b = socketpair()
... | not wfs(a, read=True, timeout=0) | modified | 153c9859afc450f05b32f5016e3d4f491ac060fb9c860fa6c70c04c76029dcd1 | assert|test_eintr_infinite_timeout|import signal import threading import time from socket import socketpair import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, wait_for_socket, wait_for_write, ) @pytest.fixture def spair(): a, b = socketpair() y... | signal.SIGALRM | 173 | 8 |
urllib3/urllib3 | train | 495 | 3d9c4a0451e0fc55d999d858813482b86948eb32 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 107 | 16 | assert | import socket
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Generator, Iterable, Optional
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server import... | expected_value_bytes | added | 773400f4a792802ae8d729432e79c39393616a4021a4ff9470eb84bd6db959b1 | assert||import socket import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Generator, Iterable, Optional import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.server ... | null | null | null | |
urllib3/urllib3 | train | 495 | 3d9c4a0451e0fc55d999d858813482b86948eb32 | train | dummyserver/testcase.py | train | urllib3/urllib3:dummyserver/testcase.py | 108 | 8 | assert | import socket
import threading
from contextlib import contextmanager
from typing import Any, Callable, ClassVar, Generator, Iterable, Optional
import pytest
from tornado import httpserver, ioloop, web
from dummyserver.handlers import TestingApp
from dummyserver.proxy import ProxyHandler
from dummyserver.server import... | header_titles | added | eb43205a98b4e6e9c7feddb1dc28c327ca1ac07f995aede91aa4681d061a80c3 | assert||import socket import threading from contextlib import contextmanager from typing import Any, Callable, ClassVar, Generator, Iterable, Optional import pytest from tornado import httpserver, ioloop, web from dummyserver.handlers import TestingApp from dummyserver.proxy import ProxyHandler from dummyserver.server ... | null | null | null | |
urllib3/urllib3 | train | 496 | a710689696a797a1add82b6e307875a936e061ae | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 878 | 8 | assert | test_url | import contextlib
import http.client as httplib
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotli
from unittest import mock
import pytest
from urllib3.exceptions import (
BodyNotHttplibCompatible,
DecodeError,
... | "https://anotherurl.com" | added | addc9e518a45ccd748bc381bc4dfd8326b50ae6dd5aa6ef57b7e97bf43ab1bb4 | assert|test_url|import contextlib import http.client as httplib import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotli from unittest import mock import pytest from urllib3.exceptions import ( BodyNotHttplibCompatible, DecodeErr... | null | null | null |
urllib3/urllib3 | train | 496 | a710689696a797a1add82b6e307875a936e061ae | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 901 | 8 | assert | test_geturl_retries | import contextlib
import http.client as httplib
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotli
from unittest import mock
import pytest
from urllib3.exceptions import (
BodyNotHttplibCompatible,
DecodeError,
... | "https://www.example.com" | added | 52c06143227d7e70500070b05f7524909783fa49aa7fd1c1f8652d2be0fe90cb | assert|test_geturl_retries|import contextlib import http.client as httplib import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotli from unittest import mock import pytest from urllib3.exceptions import ( BodyNotHttplibCompatible... | null | null | null |
urllib3/urllib3 | train | 496 | a710689696a797a1add82b6e307875a936e061ae | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 918 | 8 | assert | test__iter__ | import contextlib
import http.client as httplib
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotli
from unittest import mock
import pytest
from urllib3.exceptions import (
BodyNotHttplibCompatible,
DecodeError,
... | expected_stream | added | aef2467d10d2b204044f2be829b99a2c16f2fb877b287a5bb26a9a93a0562a10 | assert|test__iter__|import contextlib import http.client as httplib import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotli from unittest import mock import pytest from urllib3.exceptions import ( BodyNotHttplibCompatible, Decod... | null | null | null |
urllib3/urllib3 | train | 496 | a710689696a797a1add82b6e307875a936e061ae | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 939 | 8 | assert | test__iter__decode_content | import contextlib
import http.client as httplib
import socket
import ssl
import zlib
from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotli
from unittest import mock
import pytest
from urllib3.exceptions import (
BodyNotHttplibCompatible,
DecodeError,
... | data | added | 25b8607e1a863dd6651ff66f974a73b3ea44d229d97385ab5e58213726dd0c8e | assert|test__iter__decode_content|import contextlib import http.client as httplib import socket import ssl import zlib from base64 import b64decode from io import BufferedReader, BytesIO, TextIOWrapper from test import onlyBrotli from unittest import mock import pytest from urllib3.exceptions import ( BodyNotHttplibCom... | null | null | null |
urllib3/urllib3 | train | 497 | 01ae3072a4667571ea225aa77cc07aeab9882e9b | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 69 | 4 | assert | import os
import shutil
import subprocess
import nox
SOURCE_FILES = [
"docs/",
"dummyserver/",
"src/",
"test/",
"noxfile.py",
"setup.py",
]
def tests_impl(session: nox.Session, extras: str = "socks,secure,brotli") -> None:
# Install deps and the package itself.
session.install("-r", ... | process.stderr | modified | cb8e372e23541f12dcdbb6ddaf991cfcea38976c45b0ec5e23489e0a4c3177fc | assert||import os import shutil import subprocess import nox SOURCE_FILES = [ "docs/", "dummyserver/", "src/", "test/", "noxfile.py", "setup.py", ] def tests_impl(session: nox.Session, extras: str = "socks,secure,brotli") -> None: # Install deps and the package itself. session.install("-r", "dev-requirements.txt") sess... | process.stderr | 69 | 4 | |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/port_helpers.py | train | urllib3/urllib3:test/port_helpers.py | 115 | 4 | assert | # These helpers are copied from test/support/socket_helper.py in the Python 3.9 standard
# library test suite.
import socket
# Don't use "localhost", since resolving it uses the DNS under recent
# Windows versions (see issue #18792).
HOST = "127.0.0.1"
HOSTv6 = "::1"
def find_unused_port(
family: socket.Address... | isinstance(port, int) | added | 163676df779e83f877ac0a61e895eead6821d3f4f9fa3d2caf72467058dd23be | assert||# These helpers are copied from test/support/socket_helper.py in the Python 3.9 standard # library test suite. import socket # Don't use "localhost", since resolving it uses the DNS under recent # Windows versions (see issue #18792). HOST = "127.0.0.1" HOSTv6 = "::1" def find_unused_port( family: socket.Address... | null | null | null | |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 36 | 8 | assert | test_same_url | import socket
from test import resolvesLocalhostFQDN
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.exceptions import ClosedPoolError, LocationValueError
from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme
from urllib3.util import retry, timeout
... | conn2 | modified | 8413f560942551826508fe8c45f6df2336a7e5ef98328e837ba368788eab3994 | assert|test_same_url|import socket from test import resolvesLocalhostFQDN from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme from urllib3.util impo... | conn2 | 36 | 8 |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 342 | 8 | assert | test_override_pool_kwargs_host | import socket
from test import resolvesLocalhostFQDN
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.exceptions import ClosedPoolError, LocationValueError
from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme
from urllib3.util import retry, timeout
... | not default_pool.block | modified | 4bfa7769fa4796cf456360047239fbbcafa26a5864745bd43ac76d3d7877bd21 | assert|test_override_pool_kwargs_host|import socket from test import resolvesLocalhostFQDN from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.poolmanager import PoolKey, PoolManager, key_fn_by_scheme from ... | not default_pool.block | 342 | 8 |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 327 | 16 | assert | test_unverified_ssl | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | warn.called | modified | 5c2da0d5684d306caa71812100f14e279f04ba7591a7d5e8603a6df1d40b8763 | assert|test_unverified_ssl|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, ) from... | warn.called | 327 | 16 |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 608 | 16 | assert | test_ssl_wrong_system_time | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | warning.message.args[0] | modified | d0778f724e2fa8506bc6cf2df5f89ece3b203f7b670d8cb3927ceb516ac0ece3 | assert|test_ssl_wrong_system_time|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN,... | warning.message.args[0] | 608 | 16 |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 160 | 17 | pytest.raises | test_https_conn_failed | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | MaxRetryError) | modified | 1299d0e09b7a0110e391f7119b5ce3737a2a9c071ce05fe6da77f3a6d47f8705 | pytest.raises|test_https_conn_failed|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testcase... | MaxRetryError) | 160 | 17 |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 403 | 12 | assert | test_headerdict | import json
import os.path
import shutil
import socket
import tempfile
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL
import pytest
import trustme
from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address
from dummyserver.testcase import HTTPDummyProxyTestCase, IPv... | "bar" | modified | 2ec53cfbd13a88a42cb2d46bbba455784f8c050c875cdf19d9deb3ce73ed28f8 | assert|test_headerdict|import json import os.path import shutil import socket import tempfile from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlySecureTransport, withPyOpenSSL import pytest import trustme from dummyserver.server import DEFAULT_CA, HAS_IPV6, get_unreachable_address from dummyserver.testcase import HTTPDu... | "bar" | 403 | 12 |
urllib3/urllib3 | train | 498 | 372b97e4968cdd154d7bffa2f0d8b2449b3b795d | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,460 | 17 | pytest.raises | test_bad_statusline | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | ProtocolError) | modified | dcbfc2696d69e9edc563ca64890f458591118a42a86a39ee1e0dec71490c557f | pytest.raises|test_bad_statusline|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from test import ( LON... | ProtocolError) | 1,460 | 17 |
urllib3/urllib3 | train | 499 | 8d0e87cd964ee91da2898a28665a58267c802b0b | train | test/tz_stub.py | train | urllib3/urllib3:test/tz_stub.py | 36 | 4 | assert | import datetime
import os
import time
from contextlib import contextmanager
from typing import Generator, Optional
import pytest
from dateutil import tz
@contextmanager
def stub_timezone_ctx(tzname: Optional[str]) -> Generator[None, None, None]:
"""
Switch to a locally-known timezone specified by `tzname`.
... | None | added | 1ad60b780a08b9a1b2f181627424a27972e44142eba71476b3038feed35db1e5 | assert||import datetime import os import time from contextlib import contextmanager from typing import Generator, Optional import pytest from dateutil import tz @contextmanager def stub_timezone_ctx(tzname: Optional[str]) -> Generator[None, None, None]: """ Switch to a locally-known timezone specified by `tzname`. On e... | null | null | null | |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 76 | 4 | assert | import os
import shutil
import subprocess
import nox
SOURCE_FILES = [
"docs/",
"dummyserver/",
"src/",
"test/",
"noxfile.py",
"setup.py",
]
def tests_impl(
session: nox.Session,
extras: str = "socks,secure,brotli",
byte_string_comparisons: bool = True,
) -> None:
# Install de... | process.stderr | added | 6026f24224dd5865d24c562d1525c4688632579f63cc1bff51744523757e79e3 | assert||import os import shutil import subprocess import nox SOURCE_FILES = [ "docs/", "dummyserver/", "src/", "test/", "noxfile.py", "setup.py", ] def tests_impl( session: nox.Session, extras: str = "socks,secure,brotli", byte_string_comparisons: bool = True, ) -> None: # Install deps and the package itself. session.i... | null | null | null | |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 212 | 8 | assert | test_update | import pytest
from urllib3._collections import HTTPHeaderDict
from urllib3._collections import RecentlyUsedContainer as Container
class TestLRUContainer:
def test_maxsize(self):
d = Container(5)
for i in range(5):
d[i] = str(i)
assert len(d) == 5
for i in range(5):
... | ["with, comma"] | modified | bb0c127264b5edddff1d8b078bf97d965f8596af70872012af83e7b1ce68c896 | assert|test_update|import pytest from urllib3._collections import HTTPHeaderDict from urllib3._collections import RecentlyUsedContainer as Container class TestLRUContainer: def test_maxsize(self): d = Container(5) for i in range(5): d[i] = str(i) assert len(d) == 5 for i in range(5): assert d[i] == str(i) d[i + 1] = st... | ["with, comma"] | 211 | 8 |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 302 | 13 | pytest.raises | test_pop | import pytest
from urllib3._collections import HTTPHeaderDict
from urllib3._collections import RecentlyUsedContainer as Container
class TestLRUContainer:
def test_maxsize(self):
d = Container(5)
for i in range(5):
d[i] = str(i)
assert len(d) == 5
for i in range(5):
... | KeyError) | modified | 2e382837b4eb1737a5824b8df38b72cea914e911c5461b6d25fbc03b01662796 | pytest.raises|test_pop|import pytest from urllib3._collections import HTTPHeaderDict from urllib3._collections import RecentlyUsedContainer as Container class TestLRUContainer: def test_maxsize(self): d = Container(5) for i in range(5): d[i] = str(i) assert len(d) == 5 for i in range(5): assert d[i] == str(i) d[i + 1] ... | KeyError) | 301 | 13 |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 346 | 8 | assert | test_dict_conversion | import pytest
from urllib3._collections import HTTPHeaderDict
from urllib3._collections import RecentlyUsedContainer as Container
class TestLRUContainer:
def test_maxsize(self):
d = Container(5)
for i in range(5):
d[i] = str(i)
assert len(d) == 5
for i in range(5):
... | dict(HTTPHeaderDict(hdict)) | modified | e2be35add9d2f1f819a4355ac251fc3f3a4f6e343fcb9effb0a7f0a6e3da23dc | assert|test_dict_conversion|import pytest from urllib3._collections import HTTPHeaderDict from urllib3._collections import RecentlyUsedContainer as Container class TestLRUContainer: def test_maxsize(self): d = Container(5) for i in range(5): d[i] = str(i) assert len(d) == 5 for i in range(5): assert d[i] == str(i) d[i ... | dict(HTTPHeaderDict(hdict)) | 345 | 8 |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 434 | 12 | assert | test_assert_invalid_fingerprint | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | f'Fingerprints did not match. Expected "{expected}", got "{got}"' | modified | 63bd865049417bfa77158b32a40d019ad473037fcb42bf888d7bcebdd942486f | assert|test_assert_invalid_fingerprint|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhost... | str(e) | 432 | 12 |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 458 | 12 | assert | test_verify_none_and_bad_fingerprint | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | isinstance(cm.value.reason, SSLError) | added | 66596ff317488ebf2e70d7a8cd4edfd4b8518a6b5190fcee5fa0abebd85129f8 | assert|test_verify_none_and_bad_fingerprint|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLoca... | null | null | null |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 494 | 17 | pytest.raises | test_https_timeout | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | ConnectTimeoutError) | added | 9b7ac7b7110eb5df7c8eeaf5b5ffe3fc7509873399ba35cb138604e5220c3d80 | pytest.raises|test_https_timeout|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, ... | null | null | null |
urllib3/urllib3 | train | 500 | c674f48d59affef387d8f2ea817e1ae4d696e4da | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 765 | 12 | assert | test_alpn_default | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | util.ALPN_PROTOCOLS[0] | added | d2ae5d1606c740db171271b349c3c2409e762bb08f8ce770dcd8e370673a5794 | assert|test_alpn_default|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, ) from u... | null | null | null |
urllib3/urllib3 | train | 501 | 25ed51f319a3c6920bb5bd959924ca80925ee120 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 679 | 12 | assert | test_retry_weird_http_version | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | b"foo" | modified | 138814ee1db577cd7b8cfe142d6f1ce893979d2968e0b6fbd4d3ebd16f135989 | assert|test_retry_weird_http_version|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from test import ( ... | b"foo" | 679 | 12 |
urllib3/urllib3 | train | 501 | 25ed51f319a3c6920bb5bd959924ca80925ee120 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 840 | 12 | assert | test_closing_response_actually_closes_connection | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | not new_data | modified | a754168cee2672131fe8a8851aeaf70b7e163db3ac1ff0b0386547909e94dd15 | assert|test_closing_response_actually_closes_connection|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict ... | not new_data | 840 | 12 |
urllib3/urllib3 | train | 501 | 25ed51f319a3c6920bb5bd959924ca80925ee120 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,319 | 12 | assert | test_retry_ssl_error | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | b"Success" | modified | 684c4f10e35c37b047037bc4b4fceee475e913d64766a7b009856517bce17c82 | assert|test_retry_ssl_error|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from test import ( LONG_TIME... | b"Success" | 1,319 | 12 |
urllib3/urllib3 | train | 501 | 25ed51f319a3c6920bb5bd959924ca80925ee120 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,460 | 17 | pytest.raises | test_bad_statusline | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import errno
import os
import os.path
import select
import shutil
import socket
import ssl
import tempfile
from collections import OrderedDict
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
... | ProtocolError) | modified | 245117cdb5c48d50a41cf10b8593365ff4caedab16de222c9ddb9e7c08b63c30 | pytest.raises|test_bad_statusline|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from test import ( LON... | ProtocolError) | 1,460 | 17 |
urllib3/urllib3 | train | 502 | 26a74c1dbd3797e087f241d6f1ad5c956a1cff7e | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 48 | 4 | assert | test_wait_for_socket | import signal
import threading
import time
from socket import socket, socketpair
from types import FrameType
from typing import Callable, Generator, List, Tuple
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_s... | wfs(a, read=True, timeout=10) | added | e5026b8d1c60702b4bc68bc68e15235e113204a674057c8b1a96ec787f7e4730 | assert|test_wait_for_socket|import signal import threading import time from socket import socket, socketpair from types import FrameType from typing import Callable, Generator, List, Tuple import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, wait... | null | null | null |
urllib3/urllib3 | train | 502 | 26a74c1dbd3797e087f241d6f1ad5c956a1cff7e | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 100 | 4 | assert | test_wait_for_read_write | import signal
import threading
import time
from socket import socket, socketpair
from types import FrameType
from typing import Callable, Generator, List, Tuple
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_s... | not wait_for_write(a, 0) | added | 2456b7ad80db5740b2f01d57ca7b4e0f46bf9b937cfb163b87fe0af2bd0f7698 | assert|test_wait_for_read_write|import signal import threading import time from socket import socket, socketpair from types import FrameType from typing import Callable, Generator, List, Tuple import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, ... | null | null | null |
urllib3/urllib3 | train | 502 | 26a74c1dbd3797e087f241d6f1ad5c956a1cff7e | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 110 | 8 | assert | test_eintr | import signal
import threading
import time
from socket import socket, socketpair
from types import FrameType
from typing import Callable, Generator, List, Tuple
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_s... | signal.SIGALRM | added | 45bf4c597d727a7f4c32cc1e12473a4e3554b49afe6e81899a73b52ba78e110b | assert|test_eintr|import signal import threading import time from socket import socket, socketpair from types import FrameType from typing import Callable, Generator, List, Tuple import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_read, wait_for_socke... | null | null | null |
urllib3/urllib3 | train | 502 | 26a74c1dbd3797e087f241d6f1ad5c956a1cff7e | train | test/test_wait.py | train | urllib3/urllib3:test/test_wait.py | 172 | 8 | assert | test_eintr_infinite_timeout | import signal
import threading
import time
from socket import socket, socketpair
from types import FrameType
from typing import Callable, Generator, List, Tuple
import pytest
from urllib3.util.wait import (
_have_working_poll,
poll_wait_for_socket,
select_wait_for_socket,
wait_for_read,
wait_for_s... | signal.SIGALRM | added | 16dbad3c64d944b04f074c9720defe803b34ba0e5f9ecacf4fa8944f72fc81ec | assert|test_eintr_infinite_timeout|import signal import threading import time from socket import socket, socketpair from types import FrameType from typing import Callable, Generator, List, Tuple import pytest from urllib3.util.wait import ( _have_working_poll, poll_wait_for_socket, select_wait_for_socket, wait_for_rea... | null | null | null |
urllib3/urllib3 | train | 503 | c9ac6c69c12c291008261a0597361f5525998a81 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 25 | 8 | assert | test_string | from typing import Optional
from unittest import mock
import pytest
from urllib3.connectionpool import ConnectionPool
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from ... | "Retry(total=10, connect=None, read=None, redirect=None, status=None)" | added | a74dfed8583c210f3323e2e484270dae94d144f1877d1cffbc817f47eb74676d | assert|test_string|from typing import Optional from unittest import mock import pytest from urllib3.connectionpool import ConnectionPool from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3... | null | null | null |
urllib3/urllib3 | train | 503 | c9ac6c69c12c291008261a0597361f5525998a81 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 188 | 8 | assert | test_status_forcelist | from typing import Optional
from unittest import mock
import pytest
from urllib3.connectionpool import ConnectionPool
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from ... | not retry.is_retry("GET", status_code=200) | modified | 53c8385661f1209c4d02f859c16c858887e496bda387a74b035e055b325b9849 | assert|test_status_forcelist|from typing import Optional from unittest import mock import pytest from urllib3.connectionpool import ConnectionPool from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse fr... | not retry.is_retry("GET", status_code=400) | 185 | 8 |
urllib3/urllib3 | train | 503 | c9ac6c69c12c291008261a0597361f5525998a81 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 212 | 8 | assert | test_exhausted | from typing import Optional
from unittest import mock
import pytest
from urllib3.connectionpool import ConnectionPool
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from ... | not Retry(0).is_exhausted() | modified | 1b5aa2c8b18d8448b759eca80aae76f43e1a98ce8dfeb814485cd9646bf1b009 | assert|test_exhausted|from typing import Optional from unittest import mock import pytest from urllib3.connectionpool import ConnectionPool from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urll... | Retry(-1).is_exhausted() | 209 | 8 |
urllib3/urllib3 | train | 503 | c9ac6c69c12c291008261a0597361f5525998a81 | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 294 | 13 | pytest.raises | test_parse_retry_after_invalid | from typing import Optional
from unittest import mock
import pytest
from urllib3.connectionpool import ConnectionPool
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from ... | InvalidHeader) | added | a8e6e583837b1ffe128539916b1e5940a8c86b23a688c0bf1076c93acede27e5 | pytest.raises|test_parse_retry_after_invalid|from typing import Optional from unittest import mock import pytest from urllib3.connectionpool import ConnectionPool from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import... | null | null | null |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 30 | 8 | assert | test_is_ipaddress_true | import ssl
from unittest import mock
import pytest
from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7... | ssl_.is_ipaddress(addr) | modified | ef826d070abc5f82cd64791159f4111c17d129d2bcd1abb34abe0ecf4a4ba74d | assert|test_is_ipaddress_true|import ssl from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv4 "127.0.0.1", "8... | ssl_.is_ipaddress(addr) | 29 | 8 |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 71 | 12 | assert | test_sni_missing_warning_with_ip_addresses | import ssl
from unittest import mock
import pytest
from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7... | warnings | modified | dcae410f8eedced1084905d307d484290687d831f3633c773c003169c4c327f5 | assert|test_sni_missing_warning_with_ip_addresses|import ssl from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # ... | warnings | 70 | 12 |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 91 | 8 | assert | test_create_urllib3_context_set_ciphers | import ssl
from unittest import mock
import pytest
from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7... | context | modified | d4dafec3fbd31eb9fbe4debff6ccbb7819114fe84a7fb8593c0e80478de218b8 | assert|test_create_urllib3_context_set_ciphers|import ssl from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", "FE80::8939:7684:D84b:a5A4%251", # IPv... | context | 90 | 8 |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 198 | 13 | pytest.raises | test_create_urllib3_context_ssl_version_and_ssl_min_max_version_errors | import ssl
from unittest import mock
import pytest
from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1",
"::",
"FE80::8939:7... | ValueError) | added | d69c210b2322bbfc5f447b41e58b8b2a2fcda0cace8fe6027bdbd9a2f8e1e5ed | pytest.raises|test_create_urllib3_context_ssl_version_and_ssl_min_max_version_errors|import ssl from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.parametrize( "addr", [ # IPv6 "::1", "::", ... | null | null | null |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 200 | 12 | assert | test_client_key_password | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | subject["organizationalUnitName"].startswith("Testing cert") | added | 7d125b2218f98c1cdccffc13d3d6fec2604299d4eb38d962c9d63eff4a72445a | assert|test_client_key_password|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, )... | null | null | null |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 221 | 12 | assert | test_verified | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | VerifiedHTTPSConnection | added | ae13e0418eda0cf2c96b27660c01a4b6bede05c11aa3cc904757c30e6157ae9e | assert|test_verified|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, ) from unitt... | null | null | null |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 451 | 12 | assert | test_assert_invalid_fingerprint | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | f'Fingerprints did not match. Expected "{expected}", got "{got}"' | added | 6a5c27e2aa8b30226b06808f552b09f4dd2325dcd922b3e7ad5c34e1ec7e797e | assert|test_assert_invalid_fingerprint|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhost... | null | null | null |
urllib3/urllib3 | train | 504 | 66981b5dea3b007da99d9e57d6b10d286fba615d | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 676 | 16 | assert | test_tls_protocol_name_of_socket | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | self.tls_protocol_name | added | f61aca56292f2ce4476e7dceea162f94010009be37d70ec25e46e5f74b628f06 | assert|test_tls_protocol_name_of_socket|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhos... | null | null | null |
urllib3/urllib3 | train | 505 | 472109cf27c5a5b4c40aa3ceb658e1c437e417c8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 211 | 12 | assert | test_client_key_password | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | subject["organizationalUnitName"].startswith("Testing cert") | added | 8e74d7a3b58a4de0c4778ab5addc7c17664e3a14117a4d2a273d37984f497a49 | assert|test_client_key_password|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, )... | null | null | null |
urllib3/urllib3 | train | 505 | 472109cf27c5a5b4c40aa3ceb658e1c437e417c8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 289 | 12 | assert | test_ca_dir_verified | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | VerifiedHTTPSConnection | added | 6fac65b94854fa1c2fcd2ea15ffbbe0a59f8fc8682e0f5ed8134c2207f19cdbb | assert|test_ca_dir_verified|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhostFQDN, ) fro... | null | null | null |
urllib3/urllib3 | train | 505 | 472109cf27c5a5b4c40aa3ceb658e1c437e417c8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 508 | 12 | assert | test_assert_invalid_fingerprint | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | f'Fingerprints did not match. Expected "{expected}", got "{got}"' | added | 439ba73709ae9f10d635da05f1d86acf13e73d7f24fbbf78fe16b8af0b6f2c00 | assert|test_assert_invalid_fingerprint|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhost... | null | null | null |
urllib3/urllib3 | train | 505 | 472109cf27c5a5b4c40aa3ceb658e1c437e417c8 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 760 | 16 | assert | test_tls_protocol_name_of_socket | import datetime
import json
import logging
import os.path
import shutil
import ssl
import sys
import tempfile
import warnings
from test import (
LONG_TIMEOUT,
SHORT_TIMEOUT,
TARPIT_HOST,
notSecureTransport,
requires_network,
requires_ssl_context_keyfile_password,
resolvesLocalhostFQDN,
)
fro... | self.tls_protocol_name | added | 980275e9d18c23faac2cbfc8154863bdc361e355bc3dff048150f0c0119adde5 | assert|test_tls_protocol_name_of_socket|import datetime import json import logging import os.path import shutil import ssl import sys import tempfile import warnings from test import ( LONG_TIMEOUT, SHORT_TIMEOUT, TARPIT_HOST, notSecureTransport, requires_network, requires_ssl_context_keyfile_password, resolvesLocalhos... | null | null | null |
urllib3/urllib3 | train | 506 | 2ef4c3d6ece6b0ed52b1889501a2e10a7e9e7170 | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 42 | 8 | assert | test_make_multipart | from typing import List, Optional, Union
import pytest
from urllib3.fields import (
RequestField,
format_header_param,
format_header_param_html5,
format_header_param_rfc2231,
format_multipart_header_param,
guess_content_type,
)
class TestRequestField:
@pytest.mark.parametrize(
"f... | 'Content-Disposition: form-data; name="somename"\r\n' "Content-Type: image/jpg\r\n" "Content-Location: /test\r\n" "\r\n" | added | 221fb98c175eebd130628c36f7ba7f564fc3ea4a5161bfdbe94be5f6188779f0 | assert|test_make_multipart|from typing import List, Optional, Union import pytest from urllib3.fields import ( RequestField, format_header_param, format_header_param_html5, format_header_param_rfc2231, format_multipart_header_param, guess_content_type, ) class TestRequestField: @pytest.mark.parametrize( "filename, cont... | null | null | null |
urllib3/urllib3 | train | 506 | 2ef4c3d6ece6b0ed52b1889501a2e10a7e9e7170 | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 78 | 8 | assert | test_format_header_param_rfc2231_deprecated | from typing import List, Optional, Union
import pytest
from urllib3.fields import (
RequestField,
format_header_param,
format_header_param_html5,
format_header_param_rfc2231,
format_multipart_header_param,
guess_content_type,
)
class TestRequestField:
@pytest.mark.parametrize(
"f... | expect | added | 4a21748a96a1835ed2c63636c3dd03da5b2419d755270056398d10a6dc269213 | assert|test_format_header_param_rfc2231_deprecated|from typing import List, Optional, Union import pytest from urllib3.fields import ( RequestField, format_header_param, format_header_param_html5, format_header_param_rfc2231, format_multipart_header_param, guess_content_type, ) class TestRequestField: @pytest.mark.para... | null | null | null |
urllib3/urllib3 | train | 506 | 2ef4c3d6ece6b0ed52b1889501a2e10a7e9e7170 | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 106 | 8 | assert | test_format_multipart_header_param | from typing import List, Optional, Union
import pytest
from urllib3.fields import (
RequestField,
format_header_param,
format_header_param_html5,
format_header_param_rfc2231,
format_multipart_header_param,
guess_content_type,
)
class TestRequestField:
@pytest.mark.parametrize(
"f... | f'filename="{expect}"' | added | 77448a08331837fd06744b39b7af60232161bbebce2df2e43aa772876bad9c2c | assert|test_format_multipart_header_param|from typing import List, Optional, Union import pytest from urllib3.fields import ( RequestField, format_header_param, format_header_param_html5, format_header_param_rfc2231, format_multipart_header_param, guess_content_type, ) class TestRequestField: @pytest.mark.parametrize( ... | null | null | null |
urllib3/urllib3 | train | 506 | 2ef4c3d6ece6b0ed52b1889501a2e10a7e9e7170 | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 111 | 8 | assert | test_from_tuples | from typing import List, Optional, Union
import pytest
from urllib3.fields import (
RequestField,
format_header_param,
format_header_param_html5,
format_header_param_rfc2231,
format_multipart_header_param,
guess_content_type,
)
class TestRequestField:
@pytest.mark.parametrize(
"f... | 'form-data; name="file"; filename="スキー旅行.txt"' | added | 651762ed450ada0cfde32a81e505fe1c568687c2db44634b9bb978812a8a50a0 | assert|test_from_tuples|from typing import List, Optional, Union import pytest from urllib3.fields import ( RequestField, format_header_param, format_header_param_html5, format_header_param_rfc2231, format_multipart_header_param, guess_content_type, ) class TestRequestField: @pytest.mark.parametrize( "filename, content... | null | null | null |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 43 | 8 | assert | test_exceptions | import pickle
from email.errors import MessageDefect
from test import DUMMY_POOL
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
... | isinstance(result, type(exception)) | added | d547ae3a42999d5500c909f1b2407b1d3d753fe3587b94de23c6197b8dd56a97 | assert|test_exceptions|import pickle from email.errors import MessageDefect from test import DUMMY_POOL import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingEr... | null | null | null |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 51 | 8 | assert | test_header_parsing_errors | import pickle
from email.errors import MessageDefect
from test import DUMMY_POOL
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
... | str(hpe) | added | d67af8f3e27f9002d184b5acf69ee90157ecd2d46faa248b715c00d8920a191a | assert|test_header_parsing_errors|import pickle from email.errors import MessageDefect from test import DUMMY_POOL import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, Head... | null | null | null |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 60 | 8 | assert | test_pool_property_deprecation_warning | import pickle
from email.errors import MessageDefect
from test import DUMMY_POOL
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
... | err.conn | added | 11123836b74c49bececabe89f08ceae6bc5c02cf81e4f0b01a88f6eb753b9853 | assert|test_pool_property_deprecation_warning|import pickle from email.errors import MessageDefect from test import DUMMY_POOL import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoo... | null | null | null |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 66 | 8 | assert | test_pool_property_deprecation_warning | import pickle
from email.errors import MessageDefect
from test import DUMMY_POOL
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
... | isinstance(record.message, Warning) | added | 1f29ce7d5346b9fa7c5f78fe564b38d079f904e823425617064e44306310cdf6 | assert|test_pool_property_deprecation_warning|import pickle from email.errors import MessageDefect from test import DUMMY_POOL import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoo... | null | null | null |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 231 | 8 | assert | test_error_message | from test import DUMMY_POOL
from typing import Optional
from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry imp... | str(e.value) | modified | 34fda84d9d55b6becb1479e5e7545d19aec468c1745bdd384cd1125fc59128e7 | assert|test_error_message|from test import DUMMY_POOL from typing import Optional from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from urllib3.util.retry imp... | str(e.value) | 233 | 8 |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 282 | 8 | assert | test_retry_default_remove_headers_on_redirect | from test import DUMMY_POOL
from typing import Optional
from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry imp... | ["authorization"] | modified | 32e480c372182bf39d68bdb7a4c5d9bdd824ac5b27077fa1287bdbe3bd9c56a7 | assert|test_retry_default_remove_headers_on_redirect|from test import DUMMY_POOL from typing import Optional from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse ... | ["authorization"] | 284 | 8 |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 287 | 8 | assert | test_retry_set_remove_headers_on_redirect | from test import DUMMY_POOL
from typing import Optional
from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry imp... | ["x-api-secret"] | modified | d4aaac24bc641102956bfea11f52ae1a8cfc13c9a7c11cf65da7a4194ea7bf8b | assert|test_retry_set_remove_headers_on_redirect|from test import DUMMY_POOL from typing import Optional from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from... | ["x-api-secret"] | 289 | 8 |
urllib3/urllib3 | train | 507 | d8eabf304190c62766e05c79ef44be7ff94cfbcb | train | test/test_retry.py | train | urllib3/urllib3:test/test_retry.py | 361 | 16 | assert_* | test_respect_retry_after_header_sleep | from test import DUMMY_POOL
from typing import Optional
from unittest import mock
import pytest
from urllib3.exceptions import (
ConnectTimeoutError,
InvalidHeader,
MaxRetryError,
ReadTimeoutError,
ResponseError,
SSLError,
)
from urllib3.response import HTTPResponse
from urllib3.util.retry imp... | sleep_duration) | modified | cdbd85ef94af4254bd940a44557bb17d7c4f141da5006ca430ec74c99164cf30 | assert_*|test_respect_retry_after_header_sleep|from test import DUMMY_POOL from typing import Optional from unittest import mock import pytest from urllib3.exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ReadTimeoutError, ResponseError, SSLError, ) from urllib3.response import HTTPResponse from u... | sleep_duration) | 363 | 16 |
urllib3/urllib3 | train | 508 | bfc02c03c8b49da5c4229990b71584453ff506bc | train | test/test_proxymanager.py | val | urllib3/urllib3:test/test_proxymanager.py | 40 | 12 | assert | test_proxy_headers | import pytest
from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError
from urllib3.poolmanager import ProxyManager
from urllib3.util.retry import Retry
from urllib3.util.url import parse_url
from .port_helpers import find_unused_port
class TestProxyManager:
@pytest.mark.parametrize("proxy_s... | expected_headers | modified | 08465373d2682471edb590b5b36853aba9cf0d22ceb8e5c916add380bd1e3e7e | assert|test_proxy_headers|import pytest from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError from urllib3.poolmanager import ProxyManager from urllib3.util.retry import Retry from urllib3.util.url import parse_url from .port_helpers import find_unused_port class TestProxyManager: @pytest.mark.pa... | expected_headers | 40 | 12 |
urllib3/urllib3 | train | 508 | bfc02c03c8b49da5c4229990b71584453ff506bc | train | test/test_proxymanager.py | val | urllib3/urllib3:test/test_proxymanager.py | 53 | 13 | pytest.raises | test_invalid_scheme | import pytest
from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError
from urllib3.poolmanager import ProxyManager
from urllib3.util.retry import Retry
from urllib3.util.url import parse_url
from .port_helpers import find_unused_port
class TestProxyManager:
@pytest.mark.parametrize("proxy_s... | ValueError) | modified | a587c034654728f40ff06f2c64d00e97f07415cb9a46865e4ffcb9bd457a6857 | pytest.raises|test_invalid_scheme|import pytest from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError from urllib3.poolmanager import ProxyManager from urllib3.util.retry import Retry from urllib3.util.url import parse_url from .port_helpers import find_unused_port class TestProxyManager: @pytest... | ValueError) | 51 | 13 |
urllib3/urllib3 | train | 508 | bfc02c03c8b49da5c4229990b71584453ff506bc | train | test/test_proxymanager.py | val | urllib3/urllib3:test/test_proxymanager.py | 64 | 12 | assert | test_proxy_tunnel | import pytest
from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError
from urllib3.poolmanager import ProxyManager
from urllib3.util.retry import Retry
from urllib3.util.url import parse_url
from .port_helpers import find_unused_port
class TestProxyManager:
@pytest.mark.parametrize("proxy_s... | p._proxy_requires_url_absolute_form(http_url) | modified | 384a4079947ecda66ff0ac184d529d84c4f39dc73fa12dc28102cac47993cdf0 | assert|test_proxy_tunnel|import pytest from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError from urllib3.poolmanager import ProxyManager from urllib3.util.retry import Retry from urllib3.util.url import parse_url from .port_helpers import find_unused_port class TestProxyManager: @pytest.mark.par... | p._proxy_requires_url_absolute_form(http_url) | 62 | 12 |
urllib3/urllib3 | train | 508 | bfc02c03c8b49da5c4229990b71584453ff506bc | train | test/test_proxymanager.py | val | urllib3/urllib3:test/test_proxymanager.py | 84 | 12 | assert | test_proxy_connect_retry | import pytest
from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError
from urllib3.poolmanager import ProxyManager
from urllib3.util.retry import Retry
from urllib3.util.url import parse_url
from .port_helpers import find_unused_port
class TestProxyManager:
@pytest.mark.parametrize("proxy_s... | isinstance(ei1.value.reason, ProxyError) | added | b1b2c9cc16b3432392c84582f8aa883f044b9918236a6e065f9a597e40387253 | assert|test_proxy_connect_retry|import pytest from urllib3.exceptions import MaxRetryError, NewConnectionError, ProxyError from urllib3.poolmanager import ProxyManager from urllib3.util.retry import Retry from urllib3.util.url import parse_url from .port_helpers import find_unused_port class TestProxyManager: @pytest.m... | null | null | null |
urllib3/urllib3 | train | 509 | b4321fb5010b8e283c010205c86fa4258993fe44 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 232 | 8 | assert | test_https_connection_from_context_case_insensitive | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | all(isinstance(key, PoolKey) for key in p.pools.keys()) | added | 3d9d1110301ab0de7cd7640d808e177a9181b4e437632fb101b741cd9483b7c0 | assert|test_https_connection_from_context_case_insensitive|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.... | null | null | null |
urllib3/urllib3 | train | 509 | b4321fb5010b8e283c010205c86fa4258993fe44 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 251 | 8 | assert | test_http_connection_from_host_case_insensitive | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | other_pool | modified | 252c49039b414a34ff0deac3de5b8ea59b3a4123c70d8b3d85caf933a23da63a | assert|test_http_connection_from_host_case_insensitive|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exce... | all(isinstance(key, PoolKey) for key in p.pools.keys()) | 248 | 8 |
urllib3/urllib3 | train | 509 | b4321fb5010b8e283c010205c86fa4258993fe44 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 320 | 8 | assert | test_custom_pool_key | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | len(p.pools) | added | 21c23b8c9140f44e6736771424f1683732a71c38b6be34bd79609914667d0ac1 | assert|test_custom_pool_key|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exceptions import ClosedPoolErr... | null | null | null |
urllib3/urllib3 | train | 509 | b4321fb5010b8e283c010205c86fa4258993fe44 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 383 | 8 | assert | test_merge_pool_kwargs_none | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | merged | added | 5290de2b9a92cbc49cec17fa06394a3bb5704a190e5f01cf5789d5bd3d3c897d | assert|test_merge_pool_kwargs_none|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exceptions import Closed... | null | null | null |
urllib3/urllib3 | train | 510 | 950d84eeb98c4a5323ffcb55311a2ad64abe3405 | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 42 | 8 | assert | test_field_encoding | import pytest
from urllib3.fields import RequestField
from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata
BOUNDARY = "!! test boundary !!"
BOUNDARY_BYTES = BOUNDARY.encode()
class TestMultipartEncoding:
@pytest.mark.parametrize(
"fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2", "v2")... | "multipart/form-data; boundary=" + str(BOUNDARY) | modified | 187cb7b751c72de325235ef0a5e61acd5ebed87c4609b7a3976a93bf18607cbd | assert|test_field_encoding|import pytest from urllib3.fields import RequestField from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata BOUNDARY = "!! test boundary !!" BOUNDARY_BYTES = BOUNDARY.encode() class TestMultipartEncoding: @pytest.mark.parametrize( "fields", [dict(k="v", k2="v2"), [("k", "v"), (... | "multipart/form-data; boundary=" + str(BOUNDARY) | 42 | 8 |
urllib3/urllib3 | train | 510 | 950d84eeb98c4a5323ffcb55311a2ad64abe3405 | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 57 | 8 | assert | test_filename | import pytest
from urllib3.fields import RequestField
from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata
BOUNDARY = "!! test boundary !!"
BOUNDARY_BYTES = BOUNDARY.encode()
class TestMultipartEncoding:
@pytest.mark.parametrize(
"fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2", "v2")... | expected | modified | 8f32beea6a056bc33941d9eb4cbf818a261e3e85e904221808fbd6c7af7dbe1d | assert|test_filename|import pytest from urllib3.fields import RequestField from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata BOUNDARY = "!! test boundary !!" BOUNDARY_BYTES = BOUNDARY.encode() class TestMultipartEncoding: @pytest.mark.parametrize( "fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2", ... | expected | 57 | 8 |
urllib3/urllib3 | train | 510 | 950d84eeb98c4a5323ffcb55311a2ad64abe3405 | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 76 | 8 | assert | test_textplain | import pytest
from urllib3.fields import RequestField
from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata
BOUNDARY = "!! test boundary !!"
BOUNDARY_BYTES = BOUNDARY.encode()
class TestMultipartEncoding:
@pytest.mark.parametrize(
"fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2", "v2")... | "multipart/form-data; boundary=" + str(BOUNDARY) | modified | e33c36d051167ac8711c99055ba17842105a0a15b6486b37b56858ffbdbd325b | assert|test_textplain|import pytest from urllib3.fields import RequestField from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata BOUNDARY = "!! test boundary !!" BOUNDARY_BYTES = BOUNDARY.encode() class TestMultipartEncoding: @pytest.mark.parametrize( "fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2",... | "multipart/form-data; boundary=" + str(BOUNDARY) | 76 | 8 |
urllib3/urllib3 | train | 510 | 950d84eeb98c4a5323ffcb55311a2ad64abe3405 | train | test/test_filepost.py | val | urllib3/urllib3:test/test_filepost.py | 93 | 8 | assert | test_explicit | import pytest
from urllib3.fields import RequestField
from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata
BOUNDARY = "!! test boundary !!"
BOUNDARY_BYTES = BOUNDARY.encode()
class TestMultipartEncoding:
@pytest.mark.parametrize(
"fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2", "v2")... | "multipart/form-data; boundary=" + str(BOUNDARY) | modified | 7278e002201338acae136fa0a7fbad85a365b513cd30ceb09aa5b9ef2511b6ae | assert|test_explicit|import pytest from urllib3.fields import RequestField from urllib3.filepost import _TYPE_FIELDS, encode_multipart_formdata BOUNDARY = "!! test boundary !!" BOUNDARY_BYTES = BOUNDARY.encode() class TestMultipartEncoding: @pytest.mark.parametrize( "fields", [dict(k="v", k2="v2"), [("k", "v"), ("k2", ... | "multipart/form-data; boundary=" + str(BOUNDARY) | 93 | 8 |
urllib3/urllib3 | train | 511 | 3f195385726564bda2120aa1b538a858712ef931 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 28 | 13 | pytest.raises | test_match_hostname_no_cert | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | ValueError) | added | 9942559961a9bd0153999cb64195b2b864d5a804f880392d4f1374566dbaf409 | pytest.raises|test_match_hostname_no_cert|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ssl_match_h... | null | null | null |
urllib3/urllib3 | train | 511 | 3f195385726564bda2120aa1b538a858712ef931 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 34 | 13 | pytest.raises | test_match_hostname_empty_cert | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | ValueError) | added | 95a8cc4c2bfd867d7af997b1d453e2057a83440816bd2c6eef0f13741aa9ceee | pytest.raises|test_match_hostname_empty_cert|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ssl_matc... | null | null | null |
urllib3/urllib3 | train | 511 | 3f195385726564bda2120aa1b538a858712ef931 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 50 | 12 | assert_* | test_match_hostname_mismatch | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | {"subjectAltName": (("DNS", "foo"),)}) | added | 26bbcb3065ae17c4e276c3650fac173aae61d6460e808d0a05da104e15da569e | assert_*|test_match_hostname_mismatch|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ssl_match_hostn... | null | null | null |
urllib3/urllib3 | train | 511 | 3f195385726564bda2120aa1b538a858712ef931 | train | test/test_connection.py | test | urllib3/urllib3:test/test_connection.py | 135 | 8 | assert | test_HTTPSConnection_default_socket_options | import datetime
import socket
from unittest import mock
import pytest
from urllib3.connection import ( # type: ignore[attr-defined]
RECENT_DATE,
CertificateError,
HTTPSConnection,
_match_hostname,
)
from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET
from urllib3.util.ssl_match_hostname import (
Ce... | [(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)] | added | e0fa8dfc2789903b171803d2e9dc3d78202f90fdce582e5d03878906e1c68fb9 | assert|test_HTTPSConnection_default_socket_options|import datetime import socket from unittest import mock import pytest from urllib3.connection import ( # type: ignore[attr-defined] RECENT_DATE, CertificateError, HTTPSConnection, _match_hostname, ) from urllib3.util.ssl_ import _TYPE_PEER_CERT_RET from urllib3.util.ss... | null | null | null |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/contrib/test_pyopenssl_dependencies.py | train | urllib3/urllib3:test/contrib/test_pyopenssl_dependencies.py | 41 | 21 | pytest.raises | test_inject_validate_fail_cryptography | from unittest.mock import Mock, patch
import pytest
try:
from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3
except ImportError:
pass
def setup_module() -> None:
try:
from urllib3.contrib.pyopenssl import inject_into_urllib3
inject_into_urllib3()
except I... | ImportError) | modified | 158de548c52ee0de87c527731e9db57416b661613feee30d4930d0601f2396f7 | pytest.raises|test_inject_validate_fail_cryptography|from unittest.mock import Mock, patch import pytest try: from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3 except ImportError: pass def setup_module() -> None: try: from urllib3.contrib.pyopenssl import inject_into_urllib3 inject_into_ur... | ImportError) | 41 | 21 |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/contrib/test_socks.py | train | urllib3/urllib3:test/contrib/test_socks.py | 216 | 4 | assert | import socket
import threading
from socket import getaddrinfo as real_getaddrinfo
from socket import timeout as SocketTimeout
from test import SHORT_TIMEOUT
from typing import Generator, List, Optional, Tuple, Union
from unittest.mock import Mock, patch
import pytest
import socks as py_socks # type: ignore[import]
f... | SOCKS_VERSION_SOCKS4 | added | 79f6c6ccf9fdfb0b6a697a8e278fad33b88ec467ed81bee33184baa6ff3bf7ce | assert||import socket import threading from socket import getaddrinfo as real_getaddrinfo from socket import timeout as SocketTimeout from test import SHORT_TIMEOUT from typing import Generator, List, Optional, Tuple, Union from unittest.mock import Mock, patch import pytest import socks as py_socks # type: ignore[impo... | null | null | null | |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 301 | 8 | assert | test_not_equal | from typing import Iterator, List, Tuple, Union
import pytest
from urllib3._collections import HTTPHeaderDict
from urllib3._collections import RecentlyUsedContainer as Container
class TestLRUContainer:
def test_maxsize(self) -> None:
d: Container[int, str] = Container(5)
for i in range(5):
... | not (d != e) | added | 0d31c192cc42c81ca8e690347cebf7a2a7d7c31edc607380ae8a05c854f26939 | assert|test_not_equal|from typing import Iterator, List, Tuple, Union import pytest from urllib3._collections import HTTPHeaderDict from urllib3._collections import RecentlyUsedContainer as Container class TestLRUContainer: def test_maxsize(self) -> None: d: Container[int, str] = Container(5) for i in range(5): d[i] = ... | null | null | null |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 387 | 8 | assert | test_dunder_contains | from typing import Iterator, List, Tuple, Union
import pytest
from urllib3._collections import HTTPHeaderDict
from urllib3._collections import RecentlyUsedContainer as Container
class TestLRUContainer:
def test_maxsize(self) -> None:
d: Container[int, str] = Container(5)
for i in range(5):
... | d._container | added | 943127977429a10d23f6a61835fb8a8fa7ecdec293ad83d891835bae0d0180cf | assert|test_dunder_contains|from typing import Iterator, List, Tuple, Union import pytest from urllib3._collections import HTTPHeaderDict from urllib3._collections import RecentlyUsedContainer as Container class TestLRUContainer: def test_maxsize(self) -> None: d: Container[int, str] = Container(5) for i in range(5): d... | null | null | null |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/test_compatibility.py | train | urllib3/urllib3:test/test_compatibility.py | 20 | 8 | assert | test_extract | import http.cookiejar
import urllib
from urllib3.response import HTTPResponse
class TestCookiejar:
def test_extract(self) -> None:
request = urllib.request.Request("http://google.com")
cookiejar = http.cookiejar.CookieJar()
response = HTTPResponse()
cookies = [
"sessi... | len(cookies) | modified | 94820a9a499cfdf2648e97ab1aec38ea5670fe18981b39cf92bfa588a022fa6b | assert|test_extract|import http.cookiejar import urllib from urllib3.response import HTTPResponse class TestCookiejar: def test_extract(self) -> None: request = urllib.request.Request("http://google.com") cookiejar = http.cookiejar.CookieJar() response = HTTPResponse() cookies = [ "sessionhash=abcabcabcabcab; path=/; H... | len(cookies) | 20 | 8 |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/test_queue_monkeypatch.py | train | urllib3/urllib3:test/test_queue_monkeypatch.py | 28 | 21 | pytest.raises | test_queue_monkeypatching | import queue
from unittest import mock
import pytest
from urllib3 import HTTPConnectionPool
from urllib3.exceptions import EmptyPoolError
class BadError(Exception):
"""
This should not be raised.
"""
pass
class TestMonkeypatchResistance:
"""
Test that connection pool works even with a mon... | EmptyPoolError) | modified | a3373f92d5f9acd01bfe340d9f29e20610c4fc37d91f4bda82c154cda3253845 | pytest.raises|test_queue_monkeypatching|import queue from unittest import mock import pytest from urllib3 import HTTPConnectionPool from urllib3.exceptions import EmptyPoolError class BadError(Exception): """ This should not be raised. """ pass class TestMonkeypatchResistance: """ Test that connection pool works even w... | EmptyPoolError) | 28 | 21 |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 76 | 12 | assert | test_sni_missing_warning_with_ip_addresses | import ssl
from typing import Any, Dict, Optional, Union
from unittest import mock
import pytest
from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1... | warnings | modified | be755fa972f769020fd0bb1de52cc85407ce677568a46261c703c1a00b2f2550 | assert|test_sni_missing_warning_with_ip_addresses|import ssl from typing import Any, Dict, Optional, Union from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.parametrize( "addr", [ # IPv6 ":... | 0 | 73 | 12 |
urllib3/urllib3 | train | 512 | ad1bbcd75f4a8815648ccbbe2ab24e0d0b022c01 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 218 | 8 | assert | test_create_urllib3_context_ssl_version_and_ssl_min_max_version_errors | import ssl
from typing import Any, Dict, Optional, Union
from unittest import mock
import pytest
from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError
from urllib3.util import ssl_
class TestSSL:
@pytest.mark.parametrize(
"addr",
[
# IPv6
"::1... | "Can't specify both 'ssl_version' and either 'ssl_minimum_version' or 'ssl_maximum_version'" | added | c82da134c3332ec84d187ab58ec4ac8e73517bd256b87f9183178f222a0b63ef | assert|test_create_urllib3_context_ssl_version_and_ssl_min_max_version_errors|import ssl from typing import Any, Dict, Optional, Union from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.para... | null | null | null |
urllib3/urllib3 | train | 513 | 87a292aafa959059db885b7eed87eb7c7d8ebeb7 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 85 | 13 | pytest.raises | test_manager_clear | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | ClosedPoolError) | added | 32fcde369a895bd7141a8549de6f63dadeb9e0fdf343006350ac93a6101216db | pytest.raises|test_manager_clear|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exceptions import ClosedPo... | null | null | null |
urllib3/urllib3 | train | 513 | 87a292aafa959059db885b7eed87eb7c7d8ebeb7 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 183 | 8 | assert | test_default_pool_key_funcs_copy | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | p.key_fn_by_scheme | added | ac0a2b7460d02441dddb7116a1dd7f4b9cdab0eb84cf839c3312b091804851a9 | assert|test_default_pool_key_funcs_copy|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exceptions import C... | null | null | null |
urllib3/urllib3 | train | 513 | 87a292aafa959059db885b7eed87eb7c7d8ebeb7 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 225 | 8 | assert | test_https_connection_from_host_case_insensitive | import socket
from test import resolvesLocalhostFQDN
from typing import Optional
from unittest import mock
from unittest.mock import patch
import pytest
from urllib3 import connection_from_url
from urllib3.connectionpool import HTTPSConnectionPool
from urllib3.exceptions import ClosedPoolError, LocationValueError
fro... | len(p.pools) | added | b47bc05410c88c7763ffbd18835902717ba7cfcf7661f6b0fca41a31cbe5a8da | assert|test_https_connection_from_host_case_insensitive|import socket from test import resolvesLocalhostFQDN from typing import Optional from unittest import mock from unittest.mock import patch import pytest from urllib3 import connection_from_url from urllib3.connectionpool import HTTPSConnectionPool from urllib3.exc... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.