So far the test_readme have been use of re.match to find an email address in the README file. This only matches if the email address is at the start of the file. This commit changes this to re.search to find email addresses anywhere in the README file.
Signed-off-by: Ricardo Ungerer <[email protected]> --- scripts/lib/checklayer/cases/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py index 0114481434..9ea7592ba6 100644 --- a/scripts/lib/checklayer/cases/common.py +++ b/scripts/lib/checklayer/cases/common.py @@ -39,7 +39,7 @@ class CommonCheckLayer(OECheckLayerTestCase): self.assertIn('patch', data.lower(), msg="No patching information found in README.") # Check that there is an email address in the README email_regex = re.compile(r"[^@]+@[^@]+") - self.assertTrue(email_regex.match(data), msg="No email address found in README.") + self.assertTrue(email_regex.search(data), msg="No email address found in README.") def find_file_by_name(self, globs): """ -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#229790): https://lists.openembedded.org/g/openembedded-core/message/229790 Mute This Topic: https://lists.openembedded.org/mt/117369506/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
