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 | 462 | 97a16d74f287ce84dcb14aa90bf28c9088579257 | train | test/test_connectionpool.py | train | urllib3/urllib3:test/test_connectionpool.py | 280 | 12 | assert | test_put_conn_closed_pool | import http.client as httplib
import ssl
from http.client import HTTPException
from queue import Empty
from socket import error as SocketError
from ssl import SSLError as BaseSSLError
from test import SHORT_TIMEOUT
from unittest.mock import Mock, patch
import pytest
from dummyserver.server import DEFAULT_CA
from urll... | None | modified | 508d0bc14bc2debed726051362ad82ef34554c555070481877ef3ae2d46c5076 | assert|test_put_conn_closed_pool|import http.client as httplib import ssl from http.client import HTTPException from queue import Empty from socket import error as SocketError from ssl import SSLError as BaseSSLError from test import SHORT_TIMEOUT from unittest.mock import Mock, patch import pytest from dummyserver.ser... | None | 279 | 12 |
urllib3/urllib3 | train | 462 | 97a16d74f287ce84dcb14aa90bf28c9088579257 | train | test/test_response.py | train | urllib3/urllib3:test/test_response.py | 870 | 8 | assert | test_geturl | 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,
... | request_url | added | 22352923e44248fc3d29618e99a0fd8c62ae2104b4672e844b8fe9252a73ff60 | assert|test_geturl|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, Decode... | null | null | null |
urllib3/urllib3 | train | 462 | 97a16d74f287ce84dcb14aa90bf28c9088579257 | train | test/test_ssl.py | train | urllib3/urllib3:test/test_ssl.py | 100 | 17 | pytest.raises | test_create_urllib3_no_context | 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:a5... | TypeError) | added | 3e67d5c5c92ef605c0b3a2edd4267a85f394ebb7a0b59ab52f39b7c7be9c11db | pytest.raises|test_create_urllib3_no_context|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"... | null | null | null |
urllib3/urllib3 | train | 462 | 97a16d74f287ce84dcb14aa90bf28c9088579257 | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 523 | 13 | pytest.raises | test_various_flags_errors | import platform
import select
import socket
import ssl
from unittest import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume... | ValueError) | added | f6327acbd21baebeaedf4eb1ad19e7eb5b506dc772bf008f9ad8f196fb6f1db7 | pytest.raises|test_various_flags_errors|import platform import select import socket import ssl from unittest import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.ssltr... | null | null | null |
urllib3/urllib3 | train | 462 | 97a16d74f287ce84dcb14aa90bf28c9088579257 | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 649 | 13 | pytest.raises | test_is_fp_closed_object_has_neither_fp_nor_closed | 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 (... | ValueError) | modified | 52211d2daf8af7cf916b2d55ab84f4aac1ed9b7079c2485e13b7907008b0d4dd | pytest.raises|test_is_fp_closed_object_has_neither_fp_nor_closed|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_... | ValueError) | 647 | 13 |
urllib3/urllib3 | train | 462 | 97a16d74f287ce84dcb14aa90bf28c9088579257 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 84 | 12 | assert | test_multi_setcookie | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
import http.client as httplib
from dummyserver.server import (
DEFAULT_CA,
DEFAULT_CERTS,
encrypt_key_pem,
get_unreachable_address,
)
from dummyserver.testcase import SocketDummyServ... | {"set-cookie": "foo=1, bar=1"} | modified | 0711f1f1b5d2b2f2a425f4c6c629cbacfcd613288940e92f136d7cd8c3edb896 | assert|test_multi_setcookie|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import http.client as httplib from dummyserver.server import ( DEFAULT_CA, DEFAULT_CERTS, encrypt_key_pem, get_unreachable_address, ) from dummyserver.testcase import Sock... | {"set-cookie": "foo=1, bar=1"} | 83 | 12 |
urllib3/urllib3 | train | 463 | e854354f575615a332c15f833d445b84648bc46e | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 611 | 8 | assert | test_timeout_str | 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 (... | "Timeout(connect=1, read=2, total=3)" | added | 191c25fdfce07cf9e446143b218fff79737551431aac0d5e825db466dbdad10c | assert|test_timeout_str|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 urlli... | null | null | null |
urllib3/urllib3 | train | 463 | e854354f575615a332c15f833d445b84648bc46e | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 653 | 8 | assert | test_is_fp_closed_object_has_fp | 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 (... | not is_fp_closed(FpFile()) | added | 91949d0b03d144d0d43fed6add1d7d2806362acee957835d165d03b4c249365e | assert|test_is_fp_closed_object_has_fp|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, ... | null | null | null |
urllib3/urllib3 | train | 463 | e854354f575615a332c15f833d445b84648bc46e | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 778 | 13 | pytest.raises | test_to_str_error | 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 (... | TypeError, match="not expecting type int") | added | 5cd611f8d71ba83e0ae6f41bfe6959e0278548ab42d0c67b1ae43873547bdaea | pytest.raises|test_to_str_error|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 fr... | null | null | null |
urllib3/urllib3 | train | 463 | e854354f575615a332c15f833d445b84648bc46e | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 792 | 8 | assert | test_to_bytes | 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 (... | expected | added | 20a78851ea6e3a7ecce970a644cc1f5d3bbeaacae292002dc321deca095de15e | assert|test_to_bytes|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.... | null | null | null |
urllib3/urllib3 | train | 464 | 11e4402e06b74d6b9eb0c92b10bcac207e40f003 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 95 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/connection.py",
"src/ur... | process.stderr | modified | fa75f4a5d831a27ce1a9e2a6d9c109547ea65fdc413fafe8f56c6a43055e0a3b | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/connection.py", "src/urllib3/... | process.stderr | 94 | 4 | |
urllib3/urllib3 | train | 464 | 11e4402e06b74d6b9eb0c92b10bcac207e40f003 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 484 | 12 | assert | test_post_with_urlencode | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | urlencode(data) | added | 64535819b87a1bbbd0eaec5f69b1025e2f129dadb42036723667440187620fef | assert|test_post_with_urlencode|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS, N... | null | null | null |
urllib3/urllib3 | train | 464 | 11e4402e06b74d6b9eb0c92b10bcac207e40f003 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 681 | 12 | assert | test_release_conn_parameter | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | MAXSIZE - 1 | added | 9b95a2becdd78a58b2f831eba48dda5cbcf32809f1d42dd19ab298bcc3d6473a | assert|test_release_conn_parameter|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS... | null | null | null |
urllib3/urllib3 | train | 464 | 11e4402e06b74d6b9eb0c92b10bcac207e40f003 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,027 | 17 | pytest.raises | test_disabled_retry | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | NewConnectionError) | added | f3ba89abacebe4a37bb274ccab454b6e6e1b26dec786c8d1d526dd7f73b4bc34 | pytest.raises|test_disabled_retry|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS,... | null | null | null |
urllib3/urllib3 | train | 464 | 11e4402e06b74d6b9eb0c92b10bcac207e40f003 | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 1,125 | 12 | assert | test_retry_redirect_history | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | ( RequestHistory("GET", "/redirect?target=%2F", None, 303, "/"), ) | added | 7584e37e0ff1277589fae3852241947aeffdcaadbc87f4d19115ebbc83585156 | assert|test_retry_redirect_history|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS... | null | null | null |
urllib3/urllib3 | train | 465 | 2f033880938c453895e087b285d50f979acbd0ce | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 96 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/connection.py",
"src/ur... | process.stderr | modified | add1f60cf6ffeb67a3aad1566752aedfe2fe1f5151e4306ddf191a794886c260 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/connection.py", "src/urllib3/... | process.stderr | 95 | 4 | |
urllib3/urllib3 | train | 466 | 2ec06d1185f1642dfe8ff767a9ad3541bd0ddc39 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 728 | 12 | assert | test_sslkeylogfile | 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... | keylog_file.check(file=1) | modified | 97487f3276580c40e1f9e24c185ed52834287fb0cad4244374fa04269b8ee2db | assert|test_sslkeylogfile|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 ... | keylog_file.check(file=1) | 727 | 12 |
urllib3/urllib3 | train | 466 | 2ec06d1185f1642dfe8ff767a9ad3541bd0ddc39 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 731 | 12 | assert | test_sslkeylogfile | 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... | keylog_file.read().startswith( "# TLS secrets log file" ) | modified | 755a18bf4dd86da8e86388166ab38f3ce9df2e2378e79729e081cf553c4e9c8c | assert|test_sslkeylogfile|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 ... | keylog_file.read().startswith( "# TLS secrets log file" ) | 730 | 12 |
urllib3/urllib3 | train | 466 | 2ec06d1185f1642dfe8ff767a9ad3541bd0ddc39 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 756 | 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] | modified | 4b063237912e8f3a2ad3a827db00b7c5772dc5a885b63d16f43f8488bb1a45ea | 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... | util.ALPN_PROTOCOLS[0] | 755 | 12 |
urllib3/urllib3 | train | 466 | 2ec06d1185f1642dfe8ff767a9ad3541bd0ddc39 | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 791 | 17 | pytest.raises | test_common_name_without_san_fails | 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... | MaxRetryError, match="no appropriate subjectAltName") | modified | 7c21c1a6a5520ac10af1e90be8b3c598b9a3f94cf425635a962b7dbc8be3ec3c | pytest.raises|test_common_name_without_san_fails|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, resolve... | MaxRetryError, match="no appropriate subjectAltName") | 790 | 17 |
urllib3/urllib3 | train | 467 | 8e8272efda077c5a9f464259bf2a71bb8ec393ad | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 36 | 8 | assert | test_make_multipart | 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_types",
[
... | 'Content-Disposition: form-data; name="somename"\r\n' "Content-Type: image/jpg\r\n" "Content-Location: /test\r\n" "\r\n" | added | 06ecd2174e315d6f19c199a52b2e69500e5ab4b3f6a45225f0743883c6571424 | assert|test_make_multipart|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_types", [ ("image.jpg", ["image/jpeg"... | null | null | null |
urllib3/urllib3 | train | 467 | 8e8272efda077c5a9f464259bf2a71bb8ec393ad | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 70 | 8 | assert | test_format_header_param_rfc2231_deprecated | 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_types",
[
... | expect | added | 8a94e4b9fd3827ae970b5df90923db8261813c8119f7cb8ea0e2fa327b60c9db | assert|test_format_header_param_rfc2231_deprecated|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_types", [ ("i... | null | null | null |
urllib3/urllib3 | train | 467 | 8e8272efda077c5a9f464259bf2a71bb8ec393ad | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 79 | 8 | assert | test_format_header_param_html5_deprecated | 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_types",
[
... | param2 | added | c2fe9d22ce0714783c25048428e9b2a8c63484049342f7419ea281913fe5a695 | assert|test_format_header_param_html5_deprecated|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_types", [ ("ima... | null | null | null |
urllib3/urllib3 | train | 467 | 8e8272efda077c5a9f464259bf2a71bb8ec393ad | train | test/test_fields.py | train | urllib3/urllib3:test/test_fields.py | 101 | 8 | assert | test_from_tuples | 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_types",
[
... | 'form-data; name="file"; filename="スキー旅行.txt"' | added | ea54e8be698b3892833eb857a61d21c49cfbf7a504e847c34ad41bf904f8aff0 | assert|test_from_tuples|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_types", [ ("image.jpg", ["image/jpeg", "... | null | null | null |
urllib3/urllib3 | train | 468 | e4f4e50e642e1a6fa6388c045829106a199d6944 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 97 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/__init__.py",
"src/urll... | process.stderr | modified | f0cd3842d2aceb689a0c344cd704b09d131248d6227b9a9f51470eecef4c6948 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/__init__.py", "src/urllib3/co... | process.stderr | 96 | 4 | |
urllib3/urllib3 | train | 470 | ddf7361ac0467431a2f3df6ba346c9c506c29d56 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 64 | 12 | assert | test_redirect_twice | 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 HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
from urllib3.excep... | b"Dummy server!" | modified | 12d523e837d4c71e353e921ce2c96284aa8400f35aa6b0ba81df93c3fb9f6e43 | assert|test_redirect_twice|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 HTTPResponse, request from urllib3.connectionpool import port_by_... | b"Dummy server!" | 63 | 12 |
urllib3/urllib3 | train | 470 | ddf7361ac0467431a2f3df6ba346c9c506c29d56 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 104 | 12 | assert | test_cross_host_redirect | 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 HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
from urllib3.excep... | self.host_alt | modified | 8d1d9e1447f7f4f9241184253913b9eb9119d9e1de43f6106fbf93706f5ec2a7 | assert|test_cross_host_redirect|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 HTTPResponse, request from urllib3.connectionpool import por... | self.host_alt | 103 | 12 |
urllib3/urllib3 | train | 470 | ddf7361ac0467431a2f3df6ba346c9c506c29d56 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 179 | 12 | assert | test_redirect_cross_host_no_remove_headers | 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 HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
from urllib3.excep... | "foo" | modified | 0cb28e8c70f147a9573616faedfc60f628c67032d606a6376b3ee79ecde3b78e | assert|test_redirect_cross_host_no_remove_headers|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 HTTPResponse, request from urllib3.connect... | "foo" | 178 | 12 |
urllib3/urllib3 | train | 470 | ddf7361ac0467431a2f3df6ba346c9c506c29d56 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 407 | 8 | assert | test_top_level_request_with_redirect | 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 HTTPResponse, request
from urllib3.connectionpool import port_by_scheme
from urllib3.excep... | b"Dummy server!" | added | f80a8aa8caaf0eadb61cc882b6e08300f04d3460e898577415a60969804aa071 | assert|test_top_level_request_with_redirect|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 HTTPResponse, request from urllib3.connectionpoo... | null | null | null |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 167 | 8 | assert | test_https_pool_key_fields | 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
... | all(isinstance(key, PoolKey) for key in p.pools.keys()) | modified | 6028ac51761442b3d81fad25d9e46f6a29d32bdf3714d68f6e045b39e8075552 | assert|test_https_pool_key_fields|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 urll... | all(isinstance(key, PoolKey) for key in p.pools.keys()) | 166 | 8 |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 256 | 8 | assert | test_assert_hostname_and_fingerprint_flag | 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
... | pool.assert_hostname | modified | e478de08aad903785f8494b16e363bd14cc9e772b6f0fe72e44d37c40b47f94f | assert|test_assert_hostname_and_fingerprint_flag|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_s... | pool.assert_hostname | 255 | 8 |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 283 | 8 | assert | test_connection_from_context_strict_param | 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
... | len(record) | added | 10cda62c5608293b1e629cf4b975040d162d4274568e96723c3ccf7fa2786eea | assert|test_connection_from_context_strict_param|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_s... | null | null | null |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 363 | 8 | assert | test_pool_kwargs_socket_options | 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
... | override_opts | added | 4750e2a3de4bc4634db85883f122811fb467ec35ee5eac1c2a087dea2b976501 | assert|test_pool_kwargs_socket_options|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... | null | null | null |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 13 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as record:
... | response.status_code | added | 9e52017006cc5d97b429dac4e1cf6c7caef5a6c10e3aa1af792084517037bd68 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | null | null | null |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 14 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as record:
... | len(record) | added | ca3eb89efbe7e63ce52c0c254214c3357cd6553a4ca6b5ac42d4045582d4b53e | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | null | null | null |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 29 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as record:
... | response.status_code | added | a60f9290f80a593a779acc0fd3cb8d5514dc90f8c3a5af04f86e2bea00e10ffe | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | null | null | null |
urllib3/urllib3 | train | 471 | 186e7f91c058d8a04e3b894d5580001e09666ee3 | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 30 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as record:
... | len(record) | added | 4746152a89141ab830a58de8571b9490c00e871523ef64230f254c43342cea80 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | null | null | null |
urllib3/urllib3 | train | 472 | c2fd715aed78325c2062ccc523e62c62121bca87 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 98 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/socks.py",
"src... | process.stderr | modified | 7cb5a97fce2f8d0a5678ec48cb8f39810e217086f29001026b0721e3f9ddfbf9 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/socks.py", "src/urlli... | process.stderr | 97 | 4 | |
urllib3/urllib3 | train | 472 | c2fd715aed78325c2062ccc523e62c62121bca87 | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 41 | 8 | assert | test_exceptions | import pickle
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
HostChangedError,
HTTPError,
LocationParseError,
Ma... | isinstance(result, type(exception)) | modified | 557c1278f4fe287e52013ba453d06a600be9dd5ed717ae3130aca79f8558ef52 | assert|test_exceptions|import pickle import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingError, HostChangedError, HTTPError, LocationParseError, MaxRetryError... | isinstance(result, type(exception)) | 39 | 8 |
urllib3/urllib3 | train | 472 | c2fd715aed78325c2062ccc523e62c62121bca87 | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 48 | 8 | assert | test_header_parsing_errors | import pickle
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
HostChangedError,
HTTPError,
LocationParseError,
Ma... | str(hpe) | modified | 9657dad76689a8fe012a6ad64184dbb1eb15de063020089215309efa3237015b | assert|test_header_parsing_errors|import pickle import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingError, HostChangedError, HTTPError, LocationParseError, Ma... | str(hpe) | 46 | 8 |
urllib3/urllib3 | train | 472 | c2fd715aed78325c2062ccc523e62c62121bca87 | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 49 | 8 | assert | test_header_parsing_errors | import pickle
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
HostChangedError,
HTTPError,
LocationParseError,
Ma... | str(hpe) | modified | 227f5fc8b7b1fd92faf545aad8b2e48e16035206f169b59641defc201abb4767 | assert|test_header_parsing_errors|import pickle import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingError, HostChangedError, HTTPError, LocationParseError, Ma... | str(hpe) | 47 | 8 |
urllib3/urllib3 | train | 472 | c2fd715aed78325c2062ccc523e62c62121bca87 | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 58 | 8 | assert | test_pool_property_deprecation_warning | import pickle
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
HostChangedError,
HTTPError,
LocationParseError,
Ma... | err.conn | added | cd74a747a748576868e4a2d33f6a964a829aa39d2a9bcf9000671f149d51a1ad | assert|test_pool_property_deprecation_warning|import pickle import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingError, HostChangedError, HTTPError, LocationPa... | null | null | null |
urllib3/urllib3 | train | 473 | cdc0fcfac27fc4b1a2e8a8f692dbb19c94ce3b80 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 595 | 21 | pytest.raises | test_delayed_body_read_timeout_with_preload | # 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,
... | ReadTimeoutError) | added | 6a593c95212001738b1ffd8b8eff6cc340e4cf6b340f721d0e966addc76bfeff | pytest.raises|test_delayed_body_read_timeout_with_preload|# 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 OrderedDic... | null | null | null |
urllib3/urllib3 | train | 473 | cdc0fcfac27fc4b1a2e8a8f692dbb19c94ce3b80 | 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) | added | cad73d824cbc71dcb2ce469c07c67632d89ad9c83d5370ef291a684bdc7271d8 | 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... | null | null | null |
urllib3/urllib3 | train | 473 | cdc0fcfac27fc4b1a2e8a8f692dbb19c94ce3b80 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,559 | 12 | assert | test_request_headers_are_sent_in_the_original_order | # 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,
... | request_headers | added | f8872236b9e0550e12fb3bfc57675318c98c7ad6edbf103cd6f306a89355995c | assert|test_request_headers_are_sent_in_the_original_order|# 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 OrderedDi... | null | null | null |
urllib3/urllib3 | train | 473 | cdc0fcfac27fc4b1a2e8a8f692dbb19c94ce3b80 | train | test/with_dummyserver/test_socketlevel.py | train | urllib3/urllib3:test/with_dummyserver/test_socketlevel.py | 1,681 | 12 | assert | test_chunked_head_response_does_not_hang | # TODO: Break this module up into pieces. Maybe group by functionality tested
# rather than the socket level-ness of it.
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,
... | list(r.stream()) | added | 0a5672ca96ead8112c3fd9850d24660aa3ac04d91c055409036aa63adef18c6f | assert|test_chunked_head_response_does_not_hang|# TODO: Break this module up into pieces. Maybe group by functionality tested # rather than the socket level-ness of it. import errno import os import os.path import select import shutil import socket import ssl import tempfile from collections import OrderedDict from tes... | null | null | null |
urllib3/urllib3 | train | 474 | 7dee3d98004710b88faa0c96fc89ca424a505545 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 82 | 12 | assert | test_redirect_to_relative_url | 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_by_scheme
fr... | b"Dummy server!" | modified | 72d937035c6b182d9942e0fca6c8bc55d57e091138e114d7f1c94eb12d8cc16a | assert|test_redirect_to_relative_url|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.conn... | b"Dummy server!" | 82 | 12 |
urllib3/urllib3 | train | 474 | 7dee3d98004710b88faa0c96fc89ca424a505545 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 104 | 12 | assert | test_cross_host_redirect | 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_by_scheme
fr... | self.host_alt | modified | 5bf80b6c0b82b55e3e52e557951115c42ad31f9b5bfe293daa1c090081becc15 | assert|test_cross_host_redirect|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... | self.host_alt | 104 | 12 |
urllib3/urllib3 | train | 474 | 7dee3d98004710b88faa0c96fc89ca424a505545 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 225 | 17 | pytest.raises | test_unknown_scheme | 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_by_scheme
fr... | URLSchemeUnknown) | modified | c10d7d80560aacdef4cbce0ce8e926b4c4c3d25ffe13c629a14a79fee550ea1a | pytest.raises|test_unknown_scheme|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.connect... | URLSchemeUnknown) | 225 | 17 |
urllib3/urllib3 | train | 474 | 7dee3d98004710b88faa0c96fc89ca424a505545 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 414 | 8 | assert | test_top_level_request_with_preload_content | 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_by_scheme
fr... | None | added | da1115a1b0097d4b706a66dda4af84d421437cfecd2321ec31c4a979372be0c7 | assert|test_top_level_request_with_preload_content|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 fro... | null | null | null |
urllib3/urllib3 | train | 475 | a04cb71b79c0b7d41f89ec89eab559abc6ca9282 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 308 | 12 | assert | test_missing_port | 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_by_scheme
fr... | b"Dummy server!" | added | 805b1b2a36004d5e2f4b1c3385c0cc01c757db2f758a14781e68ad5140153499 | assert|test_missing_port|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 i... | null | null | null |
urllib3/urllib3 | train | 475 | a04cb71b79c0b7d41f89ec89eab559abc6ca9282 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 340 | 12 | assert | test_headers | 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_by_scheme
fr... | "quux" | added | 982bf95cb9e1d4fc049f0c973045c008cb37b979ebeb30283de5d1a9cfc9152d | assert|test_headers|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... | null | null | null |
urllib3/urllib3 | train | 475 | a04cb71b79c0b7d41f89ec89eab559abc6ca9282 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 403 | 12 | assert | test_encode_http_target | 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_by_scheme
fr... | expected_target | added | 792939c4b46fc459fe02726b0d7df5447c47b3026c70975be3b50a8dbce75ecf | assert|test_encode_http_target|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.connection... | null | null | null |
urllib3/urllib3 | train | 475 | a04cb71b79c0b7d41f89ec89eab559abc6ca9282 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 457 | 12 | assert_* | test_top_level_request_with_timeout | 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_by_scheme
fr... | f"{self.base_url}/redirect") | added | c574c893bfae1a9d7b45867fa5a3be832715f84d3d17e8871b877ca793fb4ae3 | assert_*|test_top_level_request_with_timeout|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 urll... | null | null | null |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 58 | 8 | assert | test_pool_property_deprecation_warning | import pickle
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
HostChangedError,
HTTPError,
LocationParseError,
Ma... | err.conn | modified | bf4d0ea5d38d39a5ab9214c0aee4dd2fa110f367c031e3a696100395ac9c2712 | assert|test_pool_property_deprecation_warning|import pickle import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingError, HostChangedError, HTTPError, LocationPa... | err.conn | 58 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/test_exceptions.py | val | urllib3/urllib3:test/test_exceptions.py | 63 | 8 | assert | test_pool_property_deprecation_warning | import pickle
import pytest
from urllib3.connection import HTTPConnection
from urllib3.connectionpool import HTTPConnectionPool
from urllib3.exceptions import (
ClosedPoolError,
ConnectTimeoutError,
EmptyPoolError,
HeaderParsingError,
HostChangedError,
HTTPError,
LocationParseError,
Ma... | any(record.message.args[0] == msg for record in records) | modified | 73b07af6c396cc2104c0917810897fd6c9bd0dddb6fc31d8c272187dd726efd6 | assert|test_pool_property_deprecation_warning|import pickle import pytest from urllib3.connection import HTTPConnection from urllib3.connectionpool import HTTPConnectionPool from urllib3.exceptions import ( ClosedPoolError, ConnectTimeoutError, EmptyPoolError, HeaderParsingError, HostChangedError, HTTPError, LocationPa... | msg | 63 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 311 | 8 | assert | test_custom_pool_key | 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
... | len(p.pools) | modified | e98ef70816ce353ccbd8160d45a7fce39aafff94e4ac3ca72259cbb347752afb | assert|test_custom_pool_key|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.ut... | len(p.pools) | 312 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 362 | 8 | assert | test_pool_kwargs_socket_options | 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
... | override_opts | modified | fe0311ba7b56da66a53f7362efbd27980bbe8fd879e6cc2930c5fe0684b10e4c | assert|test_pool_kwargs_socket_options|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... | override_opts | 363 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/test_poolmanager.py | train | urllib3/urllib3:test/test_poolmanager.py | 394 | 8 | assert | test_pool_manager_no_url_absolute_form | 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
... | False | modified | 6a911e468d96209311c76edd5940aeed81f459e024430ba94bad5f79c5a80aff | assert|test_pool_manager_no_url_absolute_form|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_sche... | False | 395 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 13 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as records:
... | response.status_code | modified | 7a65a2f4823d15d6cc18ee6fa55c30342c923a5f0d4c91e8e2ba785083d709c3 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | response.status_code | 13 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 18 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as records:
... | any(record.message.args[0] == msg for record in records) | modified | 4c5da82f21395f0553df7269375bc410017b246c616ecfa8c0f6e14e477827fe | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | msg | 19 | 8 |
urllib3/urllib3 | train | 476 | b0ef7fbd21a9481c6d7a7c516c7974d64142ee9c | train | test/with_dummyserver/test_integration.py | train | urllib3/urllib3:test/with_dummyserver/test_integration.py | 28 | 8 | assert | test_requests_integration | import pytest
import requests
from dummyserver.server import DEFAULT_CA
from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase
class TestHTTPIntegration(HTTPDummyServerTestCase):
def test_requests_integration(self):
with pytest.warns(DeprecationWarning) as records:
... | response.status_code | modified | 0f3e3c675977c387c8e380457a8045b1bc8b329b3963067f6f376f3d376ecad9 | assert|test_requests_integration|import pytest import requests from dummyserver.server import DEFAULT_CA from dummyserver.testcase import HTTPDummyServerTestCase, HTTPSDummyServerTestCase class TestHTTPIntegration(HTTPDummyServerTestCase): def test_requests_integration(self): with pytest.warns(DeprecationWarning) as re... | response.status_code | 29 | 8 |
urllib3/urllib3 | train | 477 | 32bb959795a720294c397fefbc6589f229b9b1a8 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 99 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/ntlmpool.py",
"... | process.stderr | modified | c2205b5aefdf1f8735e21760a3abfc5e92fbf8bcd00775fae6a429575fa7e62e | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/ntlmpool.py", "src/ur... | process.stderr | 98 | 4 | |
urllib3/urllib3 | train | 478 | fdea284d89f9ad70c903dec98263160fa4d2a568 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 412 | 13 | pytest.raises | test_top_level_request_without_keyword_args | 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_by_scheme
fr... | TypeError) | added | 436434a303cfe2b9d6f4231715cdd25e1113a9d67e76a1847a0f41aba1d3a993 | pytest.raises|test_top_level_request_without_keyword_args|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, requ... | null | null | null |
urllib3/urllib3 | train | 478 | fdea284d89f9ad70c903dec98263160fa4d2a568 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 418 | 8 | assert | test_top_level_request_with_body | 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_by_scheme
fr... | b"test" | added | 2584bb6ba15ac767f0f39b330f8a67924367699fcf7f5178617ba7d0ce9d19ae | assert|test_top_level_request_with_body|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.c... | null | null | null |
urllib3/urllib3 | train | 478 | fdea284d89f9ad70c903dec98263160fa4d2a568 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 423 | 8 | assert | test_top_level_request_with_preload_content | 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_by_scheme
fr... | None | modified | b29f079412ff453098d9f610a528cc949b6dcbcc1bbacf88a80fc8ff89d37d9e | assert|test_top_level_request_with_preload_content|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 fro... | None | 420 | 8 |
urllib3/urllib3 | train | 478 | fdea284d89f9ad70c903dec98263160fa4d2a568 | train | test/with_dummyserver/test_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_poolmanager.py | 445 | 8 | assert | test_top_level_request_with_redirect | 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_by_scheme
fr... | b"Dummy server!" | added | db717d3800df36203d44c1b3689052d48cd0a8c1b6400cfc5804aadf28b88681 | assert|test_top_level_request_with_redirect|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 urlli... | null | null | null |
urllib3/urllib3 | train | 479 | 0175d41c017f766b2c97597ecd64c39a6da09c79 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 48 | 16 | assert | test_chunks | import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pytestmark = pytest.mark.flaky
class TestChunkedTransfer(S... | hex(len(chunk))[2:].encode("utf-8") | modified | 751b9a0b924fabc55f92d2de96ab0cf3e96990d1e1a0f39eda7fe2ff3cd1cf2d | assert|test_chunks|import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry # Retry failed tests pytestmark = pytest.mark.flaky class TestChunkedTransfe... | hex(len(chunk))[2:].encode("utf-8") | 48 | 16 |
urllib3/urllib3 | train | 479 | 0175d41c017f766b2c97597ecd64c39a6da09c79 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 57 | 12 | assert | _test_body | import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pytestmark = pytest.mark.flaky
class TestChunkedTransfer(S... | header.split(b"\r\n") | modified | 758a577d172bb49315f24e5a5b16515982da38c6b7099f109d612d5759ba8890 | assert|_test_body|import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry # Retry failed tests pytestmark = pytest.mark.flaky class TestChunkedTransfer... | header.split(b"\r\n") | 57 | 12 |
urllib3/urllib3 | train | 479 | 0175d41c017f766b2c97597ecd64c39a6da09c79 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 135 | 12 | assert | test_preserve_user_agent_header | import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pytestmark = pytest.mark.flaky
class TestChunkedTransfer(S... | b"user-agent: test-agent" | added | 113f671bf9a3829b3d525ee3306808010818b7ceb673e5a35095ab6eda0da692 | assert|test_preserve_user_agent_header|import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry # Retry failed tests pytestmark = pytest.mark.flaky clas... | null | null | null |
urllib3/urllib3 | train | 479 | 0175d41c017f766b2c97597ecd64c39a6da09c79 | train | test/with_dummyserver/test_chunked_transfer.py | train | urllib3/urllib3:test/with_dummyserver/test_chunked_transfer.py | 178 | 12 | assert | test_preserve_transfer_encoding_header | import pytest
from dummyserver.testcase import (
ConnectionMarker,
SocketDummyServerTestCase,
consume_socket,
)
from urllib3 import HTTPConnectionPool
from urllib3.util import SKIP_HEADER
from urllib3.util.retry import Retry
# Retry failed tests
pytestmark = pytest.mark.flaky
class TestChunkedTransfer(S... | b"transfer-encoding: test-transfer-encoding" | added | 44bf460c3cfe97fe44bfed4a2e1f89fb2faf03b836f8d5d8b427d55d28288bed | assert|test_preserve_transfer_encoding_header|import pytest from dummyserver.testcase import ( ConnectionMarker, SocketDummyServerTestCase, consume_socket, ) from urllib3 import HTTPConnectionPool from urllib3.util import SKIP_HEADER from urllib3.util.retry import Retry # Retry failed tests pytestmark = pytest.mark.fla... | null | null | null |
urllib3/urllib3 | train | 480 | 3656d51a11965ca7deca0b436416d15301fe923e | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 100 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/_securetransport/lo... | process.stderr | modified | d27044b99462df57c9abd17584927ae2664273af6aaba48d001b9f2b646b7e7c | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/_securetransport/low_... | process.stderr | 99 | 4 | |
urllib3/urllib3 | train | 481 | 55465173b3eb233e14159908834c64367c28e203 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 101 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/_securetransport/bi... | process.stderr | modified | 68639a0c656e5c2cbe62c74a0cb7531e9f67db84d34f29b97d81d39fc0445f4e | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/_securetransport/bind... | process.stderr | 100 | 4 | |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 773 | 13 | pytest.raises | test_dnsresolver_expected_error | 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 (... | socket.gaierror) | added | 61e6d9ba40fa3d1ce2219eaa56316936bf7d740034a2d2b1fc59b6869905e98a | pytest.raises|test_dnsresolver_expected_error|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_war... | null | null | null |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 839 | 8 | assert | test_resolve_ssl_version | 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 (... | version | added | c61356c3f95b43937b500a347364fb9d6a64275dc2f2d775818d4c40c63a554c | assert|test_resolve_ssl_version|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 fr... | null | null | null |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/test_util.py | train | urllib3/urllib3:test/test_util.py | 945 | 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}") | added | 95386d41870481cbe2cb2f43368a1b82a5b3ba471687190bfedf495574c9c38a | 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... | null | null | null |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 75 | 21 | pytest.raises | test_conn_closed | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | ReadTimeoutError) | modified | c5dfe5426b886f965922ec789002863ac0ec9d19d9bfe2536fa451a046485f01 | pytest.raises|test_conn_closed|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AND_DNS, No... | ReadTimeoutError) | 74 | 21 |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/with_dummyserver/test_connectionpool.py | train | urllib3/urllib3:test/with_dummyserver/test_connectionpool.py | 524 | 12 | assert | test_post_with_multipart__iter__ | import io
import json
import logging
import socket
import sys
import time
import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT
from threading import Event
from unittest import mock
from urllib.parse import urlencode
import pytest
from dummyserver.server import HAS_IPV6_AND_DNS, NoIPv6Warning
from dummyserver.... | [ b"--boundary\r\n", b'Content-Disposition: form-data; name="hello"\r\n', b"\r\n", b"world\r\n", b"--boundary--\r\n", ] | modified | a79ae1d1ac1975b3f60949ec37024367698551e2778945ad2a3c6aebf75cc513 | assert|test_post_with_multipart__iter__|import io import json import logging import socket import sys import time import warnings from test import LONG_TIMEOUT, SHORT_TIMEOUT from threading import Event from unittest import mock from urllib.parse import urlencode import pytest from dummyserver.server import HAS_IPV6_AN... | [ b"--boundary\r\n", b'Content-Disposition: form-data; name="hello"\r\n', b"\r\n", b"world\r\n", b"--boundary--\r\n", ] | 523 | 12 |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 92 | 17 | pytest.raises | test_https_proxy_pyopenssl_not_supported | 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... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | modified | c45e6bd184ceb6f0474ad78cacc772053df16765526f64fdb6ffff3e118990ac | pytest.raises|test_https_proxy_pyopenssl_not_supported|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 du... | ProxySchemeUnsupported, match="isn't available on non-native SSLContext") | 92 | 17 |
urllib3/urllib3 | train | 482 | 1831327b881880ed871f96f56a6977d360042e1b | 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 | 363a3ba625db7634d56f13b33d7a625edebe850d368eaf742f27cca2e128c6e8 | 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 | 482 | 1831327b881880ed871f96f56a6977d360042e1b | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 448 | 17 | pytest.raises | 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... | MaxRetryError) | modified | 25bc32abb0be4d52e5ad669510b0d34082904c82b8cffd4f8ed125ed61a1d89b | pytest.raises|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.testca... | MaxRetryError) | 448 | 17 |
urllib3/urllib3 | train | 483 | dc25db8e9f03ef2c506431e8a98f77c304ac2941 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 102 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/_securetransport/bi... | process.stderr | modified | c1959c74f352db683af848ab41684f39588fd42b8476ff4bd2e966d9245f8a14 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/_securetransport/bind... | process.stderr | 101 | 4 | |
urllib3/urllib3 | train | 484 | 563f28a2c183f663c61eabcc0eef0423fb75f3c4 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 103 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/_securetransport/bi... | process.stderr | modified | 28d988a1ceb6510f1b18961f3f9cbc4ee7164a4ff6a9f9d05b5de66daeb61f00 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/_securetransport/bind... | process.stderr | 102 | 4 | |
urllib3/urllib3 | train | 485 | e22a479ad032c9cce6ece535ff7ac73423c22101 | train | noxfile.py | test | urllib3/urllib3:noxfile.py | 104 | 4 | assert | import os
import shutil
import subprocess
import nox
# Whenever type-hints are completed on a file it should be added here so that
# this file will continue to be checked by mypy. Errors from other files are
# ignored.
TYPED_FILES = {
"src/urllib3/contrib/__init__.py",
"src/urllib3/contrib/_securetransport/bi... | process.stderr | modified | c6844b4e40eb5b52782613b749a0dd823c012670ad5c2e037c7a18e92ca6b631 | assert||import os import shutil import subprocess import nox # Whenever type-hints are completed on a file it should be added here so that # this file will continue to be checked by mypy. Errors from other files are # ignored. TYPED_FILES = { "src/urllib3/contrib/__init__.py", "src/urllib3/contrib/_securetransport/bind... | process.stderr | 103 | 4 | |
urllib3/urllib3 | train | 486 | 7483682a09dc254af93e19a0c32163888ed5d773 | 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, extras="socks,secure,brotli"):
# Install deps and the package itself.
session.install("-r", "dev-requirements.txt")
... | process.stderr | added | 09319605abe360d0011a4eb86285010b79dba18ef48279196ccbbe5748b37d0d | assert||import os import shutil import subprocess import nox SOURCE_FILES = [ "docs/", "dummyserver/", "src/", "test/", "noxfile.py", "setup.py", ] def tests_impl(session, extras="socks,secure,brotli"): # Install deps and the package itself. session.install("-r", "dev-requirements.txt") session.install(f".[{extras}]") ... | null | null | null | |
urllib3/urllib3 | train | 487 | 8a1ac9f8db13d0673188d542152253d6e133eec9 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 275 | 12 | assert | test_headers | 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... | "dickory" | modified | cd80f35dfd14b8fab87fc21022e0a3b93509447e007ced155836497a631bcd63 | assert|test_headers|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 HTTPDummy... | "dickory" | 275 | 12 |
urllib3/urllib3 | train | 487 | 8a1ac9f8db13d0673188d542152253d6e133eec9 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 352 | 12 | assert | test_https_headers | 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... | f"{self.http_host}:{self.http_port}" | modified | 4d41c6b9a61ed7976a5e8df6ea915d37479b2739cc5ee7c3d1d6202b20267670 | assert|test_https_headers|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 HTT... | f"{self.http_host}:{self.http_port}" | 352 | 12 |
urllib3/urllib3 | train | 487 | 8a1ac9f8db13d0673188d542152253d6e133eec9 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 401 | 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 | 3058bd3543ad2a5e4b2a5dae11001ca7250ee82b42ecda25d992b1305e12fb78 | 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" | 401 | 12 |
urllib3/urllib3 | train | 487 | 8a1ac9f8db13d0673188d542152253d6e133eec9 | train | test/with_dummyserver/test_proxy_poolmanager.py | train | urllib3/urllib3:test/with_dummyserver/test_proxy_poolmanager.py | 456 | 17 | pytest.raises | test_https_proxy_pool_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... | MaxRetryError) | modified | 3c685019ed8c4ef600f199e30e131466e85959c345381e185c8e6ae70c222f79 | pytest.raises|test_https_proxy_pool_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.t... | MaxRetryError) | 456 | 17 |
urllib3/urllib3 | train | 488 | 8c905b09b2fef0d254e4350e52bf301348b2a8b0 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 127 | 13 | pytest.raises | test_iter | 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):
... | NotImplementedError) | added | 7b8240b5e13ec594f95171da51435d3663c0a2ad0a387877f685816a5956d65d | pytest.raises|test_iter|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]... | null | null | null |
urllib3/urllib3 | train | 488 | 8c905b09b2fef0d254e4350e52bf301348b2a8b0 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 164 | 8 | assert | test_create_from_iterator | 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):
... | len(set(teststr)) | added | db76e251a8b4639179169ff784239743307da4bba28ddffd91bcfc56543627cc | assert|test_create_from_iterator|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)... | null | null | null |
urllib3/urllib3 | train | 488 | 8c905b09b2fef0d254e4350e52bf301348b2a8b0 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 244 | 8 | assert | test_extend_from_container | 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):
... | "foo, bar, foo" | modified | 0eb3d877ad404ebece74eae0b51c1ff4c08b6af03b2886681946b0b37262e223 | assert|test_extend_from_container|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... | 2 | 241 | 8 |
urllib3/urllib3 | train | 488 | 8c905b09b2fef0d254e4350e52bf301348b2a8b0 | train | test/test_collections.py | train | urllib3/urllib3:test/test_collections.py | 331 | 8 | assert | test_items | 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):
... | items | modified | e6588ddd888aaada1a264a2f0d0a657c5db457b53d34d70f9654e3188146049e | assert|test_items|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] = str... | items | 328 | 8 |
urllib3/urllib3 | train | 490 | 4e545701f93910cffd56d830a8a4257a66b81b39 | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 53 | 13 | pytest.raises | test_no_crash_with_empty_trust_bundle | import base64
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
except Import... | ssl.SSLError) | modified | 8e458a6aff91713b636fb196ef1fa50d673564d4283897588bea6d81f211c0f6 | pytest.raises|test_no_crash_with_empty_trust_bundle|import base64 import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module(): try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_into_urllib3(... | ssl.SSLError) | 52 | 13 |
urllib3/urllib3 | train | 490 | 4e545701f93910cffd56d830a8a4257a66b81b39 | train | test/contrib/test_securetransport.py | train | urllib3/urllib3:test/contrib/test_securetransport.py | 65 | 13 | pytest.raises | test_no_crash_with_invalid_trust_bundle | import base64
import contextlib
import socket
import ssl
import pytest
try:
from urllib3.contrib.securetransport import WrappedSocket
except ImportError:
pass
def setup_module():
try:
from urllib3.contrib.securetransport import inject_into_urllib3
inject_into_urllib3()
except Import... | ssl.SSLError) | added | aca1160da95f71725f923f1c7ac33a7d798f50c3f0eeb1d0d04909ea6dd088b4 | pytest.raises|test_no_crash_with_invalid_trust_bundle|import base64 import contextlib import socket import ssl import pytest try: from urllib3.contrib.securetransport import WrappedSocket except ImportError: pass def setup_module(): try: from urllib3.contrib.securetransport import inject_into_urllib3 inject_into_urllib... | null | null | null |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | 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, extras="socks,secure,brotli"):
# Install deps and the package itself.
session.install("-r", "dev-requirements.txt")
... | process.stderr | modified | 80da79ccc6399906986f5cf8175acb0d4029ce8a044a7e0b9ae09ed3f62766eb | assert||import os import shutil import subprocess import nox SOURCE_FILES = [ "docs/", "dummyserver/", "src/", "test/", "noxfile.py", "setup.py", ] def tests_impl(session, extras="socks,secure,brotli"): # Install deps and the package itself. session.install("-r", "dev-requirements.txt") session.install(f".[{extras}]") ... | process.stderr | 69 | 4 | |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 400 | 16 | assert | test_tls_in_tls_makefile_raw_rw_binary | import platform
import select
import socket
import ssl
from unittest import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume... | None | modified | a8a3e7b5ed97bb09fa39d52e94cab26b4cf450167a2aa5116824d16e97970ab9 | assert|test_tls_in_tls_makefile_raw_rw_binary|import platform import select import socket import ssl from unittest import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util... | None | 403 | 16 |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 530 | 13 | pytest.raises | test_makefile_wrong_mode_error | import platform
import select
import socket
import ssl
from unittest import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume... | ValueError) | modified | a317ba0bc09dd292766bfdea2a519b32c12489747de47cf6657d0a0c3b0fd55b | pytest.raises|test_makefile_wrong_mode_error|import platform import select import socket import ssl from unittest import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.... | ValueError) | 533 | 13 |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/test_ssltransport.py | train | urllib3/urllib3:test/test_ssltransport.py | 542 | 17 | pytest.raises | test_wrap_ssl_read_error | import platform
import select
import socket
import ssl
from unittest import mock
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
from dummyserver.testcase import SocketDummyServerTestCase, consume_socket
from urllib3.util import ssl_
from urllib3.util.ssltransport import SSLTransport
# consume... | ssl.SSLError) | modified | 48e50c1a7a957d2db016727cac0153a49261b6eca6793ae458c71e99541eb814 | pytest.raises|test_wrap_ssl_read_error|import platform import select import socket import ssl from unittest import mock import pytest from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS from dummyserver.testcase import SocketDummyServerTestCase, consume_socket from urllib3.util import ssl_ from urllib3.util.ssltra... | ssl.SSLError) | 545 | 17 |
urllib3/urllib3 | train | 491 | ad1712a1d98596a2c9adebd2db4d7eb4d76c36ac | train | test/with_dummyserver/test_https.py | train | urllib3/urllib3:test/with_dummyserver/test_https.py | 282 | 12 | assert | test_verified_with_bad_ca_certs | 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... | "certificate verify failed" in str(e.value.reason) # PyPy is more specific or "self signed certificate in certificate chain" in str(e.value.reason) | modified | 7e0676dbce303666955cf0705bd2d59932ad19dacc0dc736067cac8f620c3d41 | assert|test_verified_with_bad_ca_certs|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.value.reason ) | 282 | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.