Skip to content

Commit 7740a07

Browse files
Rename matcher to match
1 parent 4563edc commit 7740a07

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/pytest_netdut/factories.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ def _sku(request):
150150
ssh = request.getfixturevalue(f"{name}_ssh")
151151
assert ssh.cli_flavor in {"eos", "mos"}
152152
output = ssh.sendcmd("show version", timeout=300)
153-
matcher = re.search(r"(DCS-7.*)", output)
154-
logging.info("Got SKU: %s", matcher.group(1))
155-
yield matcher.group(1)
153+
match = re.search(r"(DCS-7.*)", output)
154+
logging.info("Got SKU: %s", match.group(1))
155+
yield match.group(1)
156156

157157
return _sku
158158

@@ -164,15 +164,15 @@ def _os_version(request):
164164
assert ssh.cli_flavor in {"eos", "mos"}
165165
output = ssh.sendcmd("show version", timeout=300)
166166
if ssh.cli_flavor == "mos":
167-
matcher = re.search(r"Software image version: (\S*)", output)
167+
match = re.search(r"Software image version: (\S*)", output)
168168
else:
169169
# On release SWIs the "Sofware image version" only contains the version, e.g.
170170
# Software image version: 4.31.0F
171171
# Architecture: x86_64
172172
# Internal build version: 4.31.0F-33797590.4310F
173-
matcher = re.search(r"Internal build version: (\S*)", output)
174-
logging.info("Got OS version: %s", matcher.group(1))
175-
yield matcher.group(1)
173+
match = re.search(r"Internal build version: (\S*)", output)
174+
logging.info("Got OS version: %s", match.group(1))
175+
yield match.group(1)
176176

177177
return _os_version
178178

0 commit comments

Comments
 (0)