Mercurial > hg > orthanc-tests
comparison Plugins/Worklists/Run.py @ 637:0dc47e4975dd
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Apr 2024 18:52:58 +0200 |
parents | 685022ee236c |
children | 1e76331675a1 |
comparison
equal
deleted
inserted
replaced
636:685022ee236c | 637:0dc47e4975dd |
---|---|
141 if not isQuery: | 141 if not isQuery: |
142 tag = as_ascii[4:13].lower() | 142 tag = as_ascii[4:13].lower() |
143 if not tag in ignoreTags: | 143 if not tag in ignoreTags: |
144 line_without_comment = re.sub(b'\s*#.*', b'', line) | 144 line_without_comment = re.sub(b'\s*#.*', b'', line) |
145 line_without_comment = line_without_comment.replace(b'\0', b'') | 145 line_without_comment = line_without_comment.replace(b'\0', b'') |
146 current.append(line_without_comment[4:]) | 146 current.append(line_without_comment[3:]) |
147 | 147 |
148 if len(current) > 0: | 148 if len(current) > 0: |
149 answers.append(current) | 149 answers.append(current) |
150 | 150 |
151 return answers | 151 return answers |
157 if len(expected) == 0: | 157 if len(expected) == 0: |
158 return True | 158 return True |
159 | 159 |
160 for i in range(len(expected)): | 160 for i in range(len(expected)): |
161 for j in range(len(actual)): | 161 for j in range(len(actual)): |
162 if expected[i] == actual[j]: | 162 decoded = list(map(lambda x: x.decode('utf-8'), actual[j])) |
163 | |
164 if expected[i] == decoded: | |
163 return True | 165 return True |
164 | 166 |
165 return False | 167 return False |
166 | 168 |
167 | 169 |