Skip to content

TST: fix failing data.py tests FOR GOOD #4047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed

TST: fix failing data.py tests FOR GOOD #4047

wants to merge 9 commits into from

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jun 26, 2013

closes #4028, #3982

@cpcloud
Copy link
Member Author

cpcloud commented Jun 26, 2013

this needs to be in 0.12 since the context manager i just put in fails with this test in python3. fixing now

@cpcloud
Copy link
Member Author

cpcloud commented Jun 26, 2013

it's possible that this could fix #3982 but i'm not sure. connection reset seems to only happen on python 3 boxes

@cpcloud
Copy link
Member Author

cpcloud commented Jun 26, 2013

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

@jtratner
Copy link
Contributor

@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?

@cpcloud
Copy link
Member Author

cpcloud commented Jun 26, 2013

yep it's running on travis now

@cpcloud
Copy link
Member Author

cpcloud commented Jun 26, 2013

i'm going to grin through and see if there are any other lurking file-likes that need a context manager

@jtratner
Copy link
Contributor

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 [email protected]:

yep it's running on travis now


Reply to this email directly or view it on GitHubhttps://github.com//pull/4047#issuecomment-20086374
.

@cpcloud
Copy link
Member Author

cpcloud commented Jun 26, 2013

well that's all the calls to urlopen. still getting intermittent failures about nonexistent data. i'll see what i can do about that

@cpcloud
Copy link
Member Author

cpcloud commented Jun 27, 2013

ok well this is passing but i think i'm going to do a couple git rehashes to see if the changes are robust

@cpcloud
Copy link
Member Author

cpcloud commented Jun 27, 2013

this also fixes the test_fred suite not running on travis because its tests are marked slow and network

@jreback
Copy link
Contributor

jreback commented Jun 27, 2013

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

@cpcloud
Copy link
Member Author

cpcloud commented Jun 27, 2013

yes

@cpcloud
Copy link
Member Author

cpcloud commented Jun 27, 2013

closing. changed the branch name, opening a new pr

@cpcloud cpcloud closed this Jun 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: test_yahoo/test_options is failing (return no data)
3 participants