diff options
Diffstat (limited to 'meta/lib/patchtest/tests/test_metadata_max_length.py')
-rw-r--r-- | meta/lib/patchtest/tests/test_metadata_max_length.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/patchtest/tests/test_metadata_max_length.py b/meta/lib/patchtest/tests/test_metadata_max_length.py index b3a5dc9b79..477a9bff57 100644 --- a/meta/lib/patchtest/tests/test_metadata_max_length.py +++ b/meta/lib/patchtest/tests/test_metadata_max_length.py | |||
@@ -5,10 +5,10 @@ | |||
5 | # SPDX-License-Identifier: GPL-2.0 | 5 | # SPDX-License-Identifier: GPL-2.0 |
6 | 6 | ||
7 | import base | 7 | import base |
8 | import re | 8 | import pyparsing |
9 | 9 | ||
10 | class MaxLength(base.Base): | 10 | class MaxLength(base.Base): |
11 | add_mark = re.compile('\+ ') | 11 | add_mark = pyparsing.Regex('\+ ') |
12 | max_length = 200 | 12 | max_length = 200 |
13 | 13 | ||
14 | def test_max_line_length(self): | 14 | def test_max_line_length(self): |
@@ -18,7 +18,7 @@ class MaxLength(base.Base): | |||
18 | continue | 18 | continue |
19 | payload = str(patch) | 19 | payload = str(patch) |
20 | for line in payload.splitlines(): | 20 | for line in payload.splitlines(): |
21 | if self.add_mark.match(line): | 21 | if self.add_mark.search_string(line): |
22 | current_line_length = len(line[1:]) | 22 | current_line_length = len(line[1:]) |
23 | if current_line_length > self.max_length: | 23 | if current_line_length > self.max_length: |
24 | self.fail('Patch line too long (current length %s, maximum is %s)' % (current_line_length, self.max_length), | 24 | self.fail('Patch line too long (current length %s, maximum is %s)' % (current_line_length, self.max_length), |