From 0cd77dfea55c9fb27d81f110df5a1c0b095a69ba 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 c7ab1182f..b19df1297 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)