Skip to content

CI/TST: read_html test_banklist_url_positional_match failing with ResourceWarning on Travis #37766

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Travis builds are recently failing, eg https://travis-ci.org/github/pandas-dev/pandas/jobs/742927007

=================================== FAILURES ===================================

_____________ TestReadHtml.test_banklist_url_positional_match[bs4] _____________

[gw0] linux -- Python 3.7.8 /home/travis/miniconda3/envs/pandas-dev/bin/python

self = <pandas.tests.io.test_html.TestReadHtml object at 0x7f3091661050>

    @tm.network

    def test_banklist_url_positional_match(self):

        url = "http://www.fdic.gov/bank/individual/failed/banklist.html"

        # Passing match argument as positional should cause a FutureWarning.

        with tm.assert_produces_warning(FutureWarning):

            df1 = self.read_html(

>               url, "First Federal Bank of Florida", attrs={"id": "table"}

            )

pandas/tests/io/test_html.py:130: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <contextlib._GeneratorContextManager object at 0x7f309168d4d0>

type = None, value = None, traceback = None

    def __exit__(self, type, value, traceback):

        if type is None:

            try:

>               next(self.gen)

E               AssertionError: Caused unexpected warning(s): [('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.10', 43648), raddr=('172.217.212.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/treebuilders/base.py', 38), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.10', 43650), raddr=('172.217.212.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/html5lib/treebuilders/base.py', 38), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=43, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.10', 43962), raddr=('172.217.214.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/bs4/builder/_html5lib.py', 335), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=42, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.10', 46504), raddr=('74.125.124.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/bs4/builder/_html5lib.py', 335), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=41, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.10', 46502), raddr=('74.125.124.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/bs4/builder/_html5lib.py', 335), ('ResourceWarning', ResourceWarning("unclosed <ssl.SSLSocket fd=15, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.20.0.10', 43640), raddr=('172.217.212.95', 443)>"), '/home/travis/miniconda3/envs/pandas-dev/lib/python3.7/site-packages/bs4/builder/_html5lib.py', 335)]

../../../miniconda3/envs/pandas-dev/lib/python3.7/contextlib.py:119: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    Duplicate ReportDuplicate issue or pull requestIO HTMLread_html, to_html, Styler.apply, Styler.applymapTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions