Skip to content

Commit

Permalink
test_ukify: use raw string for the regex
Browse files Browse the repository at this point in the history
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 a0485e0)
  • Loading branch information
mrc0mmand authored and bluca committed Feb 12, 2024
1 parent 5a56699 commit 713bf2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ukify/test/test_ukify.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ def test_key_cert_generation(tmp_path):
'-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))

0 comments on commit 713bf2f

Please sign in to comment.