diff --git a/pandas/io/common.py b/pandas/io/common.py index a2cf057c8f531..f4a4ef789510c 100644 --- a/pandas/io/common.py +++ b/pandas/io/common.py @@ -61,7 +61,7 @@ def _is_url(url): def _is_s3_url(url): """Check for an s3 url""" try: - return urlparse.urlparse(url).scheme == 's3' + return parse_url(url).scheme == 's3' except: return False diff --git a/pandas/io/tests/test_data.py b/pandas/io/tests/test_data.py index c85fd61e975e9..34b2811876f30 100644 --- a/pandas/io/tests/test_data.py +++ b/pandas/io/tests/test_data.py @@ -332,6 +332,10 @@ def test_get_put_data_warning(self): class TestDataReader(unittest.TestCase): + def test_is_s3_url(self): + from pandas.io.common import _is_s3_url + self.assert_(_is_s3_url("s3://pandas/somethingelse.com")) + @network def test_read_yahoo(self): gs = DataReader("GS", "yahoo")