Skip to content

Commit 80b9d84

Browse files
committed
TST: split test_url and make with @network portion requiring network access
1 parent 8f8b71a commit 80b9d84

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pandas/io/tests/test_parsers.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from pandas import DataFrame, Index, isnull
2121
from pandas.io.parsers import (read_csv, read_table, read_fwf,
2222
ExcelFile, TextParser)
23-
from pandas.util.testing import assert_almost_equal, assert_frame_equal
23+
from pandas.util.testing import assert_almost_equal, assert_frame_equal, network
2424
import pandas._tseries as lib
2525
from pandas.util import py3compat
2626

@@ -798,6 +798,7 @@ def test_na_value_dict(self):
798798
assert_frame_equal(df, expected)
799799

800800
@slow
801+
@network
801802
def test_url(self):
802803
# HTTP(S)
803804
url = 'https://raw.github.com/pydata/pandas/master/pandas/io/tests/salary.table'
@@ -806,10 +807,18 @@ def test_url(self):
806807
localtable = os.path.join(dirpath, 'salary.table')
807808
local_table = read_table(localtable)
808809
assert_frame_equal(url_table, local_table)
810+
#TODO: ftp testing
811+
812+
@slow
813+
def test_file(self):
809814
# FILE
815+
dirpath = curpath()
816+
localtable = os.path.join(dirpath, 'salary.table')
817+
local_table = read_table(localtable)
818+
810819
url_table = read_table('file://localhost/'+localtable)
811820
assert_frame_equal(url_table, local_table)
812-
#TODO: ftp testing
821+
813822

814823
class TestParseSQL(unittest.TestCase):
815824

0 commit comments

Comments
 (0)