Skip to content
Prev Previous commit
Next Next commit
Disable pylint import-error for tests involving py.path
  • Loading branch information
slackline committed Oct 9, 2022
commit ba0019bec04fb2d7f747e4c88cd3db93fb6b1ad6
2 changes: 1 addition & 1 deletion pandas/tests/io/excel/test_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def test_read_from_pathlib_path(self, read_ext):
def test_read_from_py_localpath(self, read_ext):

# GH12655
from py.path import local as LocalPath
from py.path import local as LocalPath # pylint: disable=import-error

str_path = os.path.join("test1" + read_ext)
expected = pd.read_excel(str_path, sheet_name="Sheet1", index_col=0)
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/io/pytables/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from pandas._libs.tslibs import Timestamp
from pandas.compat import is_platform_windows
import pandas.util._test_decorators as td

import pandas as pd
from pandas import (
Expand All @@ -21,7 +22,6 @@
ensure_clean_path,
ensure_clean_store,
)
from pandas.util import _test_decorators as td

from pandas.io.pytables import TableIterator

Expand Down Expand Up @@ -293,7 +293,7 @@ def test_read_from_pathlib_path(setup_path):
def test_read_from_py_localpath(setup_path):

# GH11773
from py.path import local as LocalPath
from py.path import local as LocalPath # pylint: disable=import-error

expected = DataFrame(
np.random.rand(4, 5), index=list("abcd"), columns=list("ABCDE")
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/sas/test_sas7bdat.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_path_pathlib(self, dirpath, data_test_ix):
@td.skip_if_no("py.path")
@pytest.mark.slow
def test_path_localpath(self, dirpath, data_test_ix):
from py.path import local as LocalPath
from py.path import local as LocalPath # pylint: disable=import-error

df0, test_ix = data_test_ix
for k in test_ix:
Expand Down