1
1
# pylint: disable=E1101
2
2
import os
3
- import sys
4
3
import warnings
5
4
from datetime import datetime , date , time , timedelta
6
5
from distutils .version import LooseVersion
16
15
import pandas .util .testing as tm
17
16
import pandas .util ._test_decorators as td
18
17
from pandas import DataFrame , Index , MultiIndex
19
- from pandas .compat import u , range , map , BytesIO , iteritems
18
+ from pandas .compat import u , range , map , BytesIO , iteritems , PY36
20
19
from pandas .core .config import set_option , get_option
21
20
from pandas .io .common import URLError
22
21
from pandas .io .excel import (
@@ -585,9 +584,6 @@ def test_read_from_s3_url(self, ext):
585
584
def test_read_from_file_url (self , ext ):
586
585
587
586
# FILE
588
- if sys .version_info [:2 ] < (2 , 6 ):
589
- pytest .skip ("file:// not supported with Python < 2.6" )
590
-
591
587
localtable = os .path .join (self .dirpath , 'test1' + ext )
592
588
local_table = read_excel (localtable )
593
589
@@ -2314,9 +2310,9 @@ def custom_converter(css):
2314
2310
2315
2311
2316
2312
@td .skip_if_no ('openpyxl' )
2313
+ @pytest .mark .skipif (not PY36 , reason = 'requires fspath' )
2317
2314
class TestFSPath (object ):
2318
2315
2319
- @pytest .mark .skipif (sys .version_info < (3 , 6 ), reason = 'requires fspath' )
2320
2316
def test_excelfile_fspath (self ):
2321
2317
with tm .ensure_clean ('foo.xlsx' ) as path :
2322
2318
df = DataFrame ({"A" : [1 , 2 ]})
@@ -2325,8 +2321,6 @@ def test_excelfile_fspath(self):
2325
2321
result = os .fspath (xl )
2326
2322
assert result == path
2327
2323
2328
- @pytest .mark .skipif (sys .version_info < (3 , 6 ), reason = 'requires fspath' )
2329
- # @pytest.mark.xfail
2330
2324
def test_excelwriter_fspath (self ):
2331
2325
with tm .ensure_clean ('foo.xlsx' ) as path :
2332
2326
writer = ExcelWriter (path )
0 commit comments