Skip to content

Commit

Permalink
Fix wikipedia tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Aug 4, 2021
1 parent f3f2890 commit b1a7dbb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,18 @@ def country_population():
for row in rows:
cells = row.findall('td')
if len(cells) > 3:
name = cells[0].find('.//a').attrib.get('title')
population = cells[1].text
name = cells[0].findall('.//a')
if not name:
continue
name = name[0].text
population = cells[2].text
yield(dict(
name=name,
population=population
))

def test_example_3():
from dataflows import Flow
from dataflows import Flow, printer

f = Flow(
country_population(),
Expand Down

0 comments on commit b1a7dbb

Please sign in to comment.