20
20
from pandas import DataFrame , Index , isnull
21
21
from pandas .io .parsers import (read_csv , read_table , read_fwf ,
22
22
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
24
24
import pandas ._tseries as lib
25
25
from pandas .util import py3compat
26
26
@@ -798,6 +798,7 @@ def test_na_value_dict(self):
798
798
assert_frame_equal (df , expected )
799
799
800
800
@slow
801
+ @network
801
802
def test_url (self ):
802
803
# HTTP(S)
803
804
url = 'https://raw.github.com/pydata/pandas/master/pandas/io/tests/salary.table'
@@ -806,10 +807,20 @@ def test_url(self):
806
807
localtable = os .path .join (dirpath , 'salary.table' )
807
808
local_table = read_table (localtable )
808
809
assert_frame_equal (url_table , local_table )
810
+ #TODO: ftp testing
811
+
812
+ @slow
813
+ def test_file (self ):
809
814
# FILE
815
+ if sys .version_info [:2 ] < (2 , 6 ):
816
+ raise nose .SkipTest ("file:// not supported with Python < 2.6" )
817
+ dirpath = curpath ()
818
+ localtable = os .path .join (dirpath , 'salary.table' )
819
+ local_table = read_table (localtable )
820
+
810
821
url_table = read_table ('file://localhost/' + localtable )
811
822
assert_frame_equal (url_table , local_table )
812
- #TODO: ftp testing
823
+
813
824
814
825
class TestParseSQL (unittest .TestCase ):
815
826
0 commit comments