Merge 5f1f3aa6f8
into f426c0b35a
This commit is contained in:
commit
9c585bdec3
|
@ -137,7 +137,7 @@ class NeverRaised(Exception):
|
|||
|
||||
class Visitor:
|
||||
def __init__(self, fil, rec, ignore, bf, sort):
|
||||
if isinstance(fil, str):
|
||||
if isinstance(fil, (str, bytes)):
|
||||
fil = FNMatcher(fil)
|
||||
if isinstance(rec, str):
|
||||
self.rec: Callable[[LocalPath], bool] = FNMatcher(rec)
|
||||
|
|
|
@ -207,7 +207,7 @@ class CommonFSTests:
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"fil",
|
||||
["*dir", "*dir", pytest.mark.skip("sys.version_info < (3,6)")(b"*dir")],
|
||||
["*dir", "*dir", pytest.mark.skipif("sys.version_info < (3,10)")(b"*dir")],
|
||||
)
|
||||
def test_visit_filterfunc_is_string(self, path1, fil):
|
||||
lst = []
|
||||
|
@ -461,12 +461,10 @@ class CommonFSTests:
|
|||
|
||||
assert fspath(path1) == path1.strpath
|
||||
|
||||
@pytest.mark.skip("sys.version_info < (3,6)")
|
||||
def test_fspath_open(self, path1):
|
||||
f = path1.join("opentestfile")
|
||||
open(f)
|
||||
|
||||
@pytest.mark.skip("sys.version_info < (3,6)")
|
||||
def test_fspath_fsencode(self, path1):
|
||||
from os import fsencode
|
||||
|
||||
|
|
Loading…
Reference in New Issue