diff --git a/pandas/io/tests/test_wb.py b/pandas/io/tests/test_wb.py index 19fee9361ae40..7cdfc85b84e90 100644 --- a/pandas/io/tests/test_wb.py +++ b/pandas/io/tests/test_wb.py @@ -15,17 +15,13 @@ class TestWB(tm.TestCase): @network def test_wdi_search(self): - expected = {u('id'): {6716: u('NY.GDP.PCAP.KD'), - 6718: u('NY.GDP.PCAP.KN'), - 6720: u('NY.GDP.PCAP.PP.KD')}, - u('name'): {6716: u('GDP per capita (constant 2005 US$)'), - 6718: u('GDP per capita (constant LCU)'), - 6720: u('GDP per capita, PPP (constant 2011 ' - 'international $)')}} - result = search('gdp.*capita.*constant').loc[6716:,['id','name']] - expected = pandas.DataFrame(expected) - expected.index = result.index - assert_frame_equal(result, expected) + # Test that a name column exists, and that some results were returned + # ...without being too strict about what the actual contents of the + # results actually are. The fact that there are some, is good enough. + + result = search('gdp.*capita.*constant') + GDP_labels = [l for l in result.name if 'GDP' in l.upper()] + self.assertTrue(len(GDP_labels) > 1) @slow @network