summaryrefslogtreecommitdiff
path: root/test/py/tests/test_bind.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-10-19 17:25:15 -0400
committerTom Rini <trini@konsulko.com>2019-10-22 14:58:22 -0400
commit96db04d6f25b168762da5d978411e5e745ce5060 (patch)
treeba868cc8e538bfc61220db6ff8548184dbd52c1c /test/py/tests/test_bind.py
parent8afc44b9386432d543fcdb061f58f83e8a760aa7 (diff)
downloadu-boot-WIP/Update-test.py-tests.tar.gz
test/py: Use raw strings more to avoid deprecation warningsWIP/Update-test.py-tests
We have two further uses of raw string usage in the test/py codebase that are used under CI. The first of which is under the bind test and is a direct update. The second of which is to strip VT100 codes from the match buffer. While switching this to a raw string is also a direct update, the comment it notes that problems were encountered on Ubuntu 14.04 (and whatever Python 2 version that was) that required slight tweaks to the regex. Replace that now that we're saying Python 3.5 is the minimum. Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@konsulko.com> --- Changes in v2: - New patch
Diffstat (limited to 'test/py/tests/test_bind.py')
-rw-r--r--test/py/tests/test_bind.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index 2d48484c6a..20c6050342 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -9,11 +9,11 @@ def in_tree(response, name, uclass, drv, depth, last_child):
lines = [x.strip() for x in response.splitlines()]
leaf = ' ' * 4 * depth;
if not last_child:
- leaf = leaf + '\|'
+ leaf = leaf + r'\|'
else:
leaf = leaf + '`'
leaf = leaf + '-- ' + name
- line = (' *{:10.10} [0-9]* \[ [ +] \] {:20.20} {}$'
+ line = (r' *{:10.10} [0-9]* \[ [ +] \] {:20.20} {}$'
.format(uclass, drv, leaf))
prog = re.compile(line)
for l in lines: