blaze / odo

Data Migration for the Blaze Project
http://odo.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.01k stars 138 forks source link

Fix usage of deprecated pandas api #553

Closed dhirschfeld closed 7 years ago

dhirschfeld commented 7 years ago

The tslib namespace is deprecated.

Calling type(pd.NaT) is equivalent and works even on pandas 0.15.0.

llllllllll commented 7 years ago

idk why this test is flapping, it looks like it is trying to hit some remote resource. We need to patch that so its not actually doing network IO. I probably won't be able to do that until this weekend but I could help you with it if you want to fix the test ;)

dhirschfeld commented 7 years ago

Yeah, it seems a of an anti-pattern having unit-tests trying to hit the web.

If you don't get to it first I can take a look next week as it's coming up :beer: o'clock down these parts!

dhirschfeld commented 7 years ago

The offending test is:

@pytest.mark.xfail(raises=HTTPError)
def test_failed_url():
    failed_url = "http://foo.com/myfile.csv"
    with tmpfile('.csv') as fn:
        odo(failed_url, fn)

When I run that locally it works fine but on Travis it seems to give a timeout error rather than an HTTPError:

URLError: <urlopen error [Errno 110] Connection timed out>
dhirschfeld commented 7 years ago

I don't have much experience mocking http requests but I gave it a go over at #557.

dhirschfeld commented 7 years ago

See also #546

dhirschfeld commented 7 years ago

@llllllllll - would be good to get this merged if you can find the time...

llllllllll commented 7 years ago

is this the same as: https://github.com/blaze/odo/pull/546/files?

dhirschfeld commented 7 years ago

Duplicate of #546