Importing bs4 in tests #3605

Closed
jseabold opened this Issue May 14, 2013 · 6 comments

Comments

Projects
None yet
3 participants
Contributor

jseabold commented May 14, 2013

I just got a bunch of test errors because I don't have bs4. I do have lxml. Haven't looked at this at all to see why the test isn't conditional. E.g.,

======================================================================
ERROR: test_string (pandas.io.tests.test_html.TestBs4ReadHtml)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/skipper/src/pandas-skipper/pandas/io/tests/test_html.py", line 221, in test_string
    df1 = self.run_read_html(data, '.*Water.*', infer_types=False)
  File "/home/skipper/src/pandas-skipper/pandas/io/tests/test_html.py", line 324, in run_read_html
    return _run_read_html(*args, **kwargs)
  File "/home/skipper/src/pandas-skipper/pandas/io/tests/test_html.py", line 31, in _run_read_html
    return read_html(*args, **kwargs)
  File "/home/skipper/src/pandas-skipper/pandas/io/html.py", line 701, in read_html
    for data in p.parse_raw_data()]
  File "/home/skipper/src/pandas-skipper/pandas/io/html.py", line 152, in parse_raw_data
    for rows in self.parse_rows()]
  File "/home/skipper/src/pandas-skipper/pandas/io/html.py", line 137, in parse_rows
    tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
  File "/home/skipper/src/pandas-skipper/pandas/io/html.py", line 333, in _build_doc
    from bs4 import BeautifulSoup, SoupStrainer
ImportError: No module named bs4
Member

cpcloud commented May 14, 2013

@jseabold What branch of yours are you using?

Contributor

jseabold commented May 14, 2013

Branched off earlier today from 6d2c57f.

Member

cpcloud commented May 14, 2013

yep, i can repro this. fixing now...

Member

cpcloud commented May 15, 2013

this is fixed in #3616

Member

cpcloud commented May 20, 2013

@jseabold can u try out the tests on my branch read-html?

Contributor

jreback commented May 20, 2013

closed by #3616

jreback closed this May 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment