From 75ef5845580c7a524d900221d6c405d83fff05de Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 21 May 2024 09:03:50 +0200 Subject: [PATCH] Fix a base string usage that need to also take bytes into account --- src/_pytest/_py/path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/_py/path.py b/src/_pytest/_py/path.py index b7131b08a20..998a7819972 100644 --- a/src/_pytest/_py/path.py +++ b/src/_pytest/_py/path.py @@ -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)