Patchwork [2,of,9] run-tests: clarify "l" variable as "out_rawline"

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 7, 2019, 12:16 p.m.
Message ID <fd5c60869c435d10960d.1567858601@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41532/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 7, 2019, 12:16 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1560518057 -3600
#      Fri Jun 14 14:14:17 2019 +0100
# Node ID fd5c60869c435d10960d060fd0bd37dfb7dcea3c
# Parent  f927343f31b96019d36f0546f71ebe9a357b0123
# EXP-Topic test-match
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r fd5c60869c43
run-tests: clarify "l" variable as "out_rawline"

More explicit variable name never hurt.

(This is a gratuitous cleanup that I made while investigating a bug).

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1611,10 +1611,10 @@  class TTest(Test):
 
         pos = -1
         postout = []
-        for l in output:
-            lout, lcmd = l, None
-            if salt in l:
-                lout, lcmd = l.split(salt, 1)
+        for out_rawline in output:
+            lout, lcmd = out_rawline, None
+            if salt in out_rawline:
+                lout, lcmd = out_rawline.split(salt, 1)
 
             while lout:
                 if not lout.endswith(b'\n'):