Skip to content

Commit

Permalink
Improve remote driver log matching performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyifan committed Oct 24, 2024
1 parent a1c2861 commit ee0f8ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testplan/common/utils/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ def _prepare_regexp(self, regexp: Regex) -> Pattern[AnyStr]:

if isinstance(regexp, (str, bytes)):
regexp = re.compile(regexp)
else:
try:
import rpyc
if isinstance(regexp, rpyc.core.netref.BaseNetref):
regexp = re.compile(regexp.pattern, regexp.flags)
except ImportError:
pass

try:
if self.binary and isinstance(regexp.pattern, str):
raise TypeError(
Expand Down

0 comments on commit ee0f8ac

Please sign in to comment.