TST: fix failing data.py tests FOR GOOD
closes #4028, #3982

this needs to be in 0.12 since the context manager i just put in fails with this test in python3. fixing now
 it's possible that this could fix #3982 but i'm not sure. connection reset seems to only happen on python 3 boxes
 hm in `can_connect` there's a call to urlopen that isn't closed...will add a context manager. shouldn't matter though since it's calling out to a different url, but best not to leave the object open anyway

cc @jtratner
 @cpcloud yes, that's absolutely my bad. I actually didn't realize that `urlopen` needed to be closed (and actually when you were commenting on another issue, I realized I hadn't done that).  Should be a really simple fix, no?
 yep it's running on travis now
 i'm going to `grin` through and see if there are any other lurking file-likes that need a context manager
 Sorry about that! Definitely a "A few days ago I learned -- You have to
close urlopen results" :P

On Wed, Jun 26, 2013 at 6:59 PM, Phillip Cloud notifications@github.comwrote:

> yep it's running on travis now
> 
> —
> Reply to this email directly or view it on GitHubhttps://github.com/pydata/pandas/pull/4047#issuecomment-20086374
> .
 well that's all the calls to `urlopen`. still getting intermittent failures about nonexistent data. i'll see what i can do about that
 ok well this is passing but i think i'm going to do a couple git rehashes to see if the changes are robust
 this also fixes the `test_fred` suite not running on travis because its tests are marked slow and network
 this fixes this as well? (this was running full suite locally)

```
======================================================================
FAIL: Throws an exception when DataReader can't get a 200 response from
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/home/jreback/pandas/pandas/util/testing.py", line 851, in wrapper
    return t(*args, **kwargs)
  File "/mnt/home/jreback/pandas/pandas/io/tests/test_fred.py", line 31, in test_fred
    16004.5)
AssertionError: DATE
2013-01-01    15984.1
Name: GDP, dtype: float64 != 16004.5
```
 yes
 closing. changed the branch name, opening a new pr
