You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
2 days ago
|
From 1c4640a859937b84d3f31dd2fa054f7d744d65f4 Mon Sep 17 00:00:00 2001
|
||
|
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||
|
Date: Sat, 3 Feb 2024 15:46:26 +0100
|
||
|
Subject: [PATCH] test_ukify: use raw string for the regex
|
||
|
|
||
|
To get rid of the "invalid escape sequence" warning:
|
||
|
|
||
|
=============================== warnings summary ===============================
|
||
|
../src/ukify/test/test_ukify.py:876
|
||
|
../src/ukify/test/test_ukify.py:876: SyntaxWarning: invalid escape sequence '\s'
|
||
|
assert re.search('Issuer: CN\s?=\s?SecureBoot signing key on host', out)
|
||
|
|
||
|
(cherry picked from commit a0485e07b38b3b1195a92ba86a173742f2bb867a)
|
||
|
|
||
|
Related: RHEL-30372
|
||
|
---
|
||
|
src/ukify/test/test_ukify.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py
|
||
|
index 31054eabea..f233e25cf7 100755
|
||
|
--- a/src/ukify/test/test_ukify.py
|
||
|
+++ b/src/ukify/test/test_ukify.py
|
||
|
@@ -850,7 +850,7 @@ def test_key_cert_generation(tmpdir):
|
||
|
'-noout',
|
||
|
], text = True)
|
||
|
assert 'Certificate' in out
|
||
|
- assert re.search('Issuer: CN\s?=\s?SecureBoot signing key on host', out)
|
||
|
+ assert re.search(r'Issuer: CN\s?=\s?SecureBoot signing key on host', out)
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
sys.exit(pytest.main(sys.argv))
|