Mercurial > hg > orthanc-tests
comparison Plugins/Worklists/Run.py @ 639:d5e355d9797c
test of worklists now working with Python 2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 02 Apr 2024 20:11:09 +0200 |
parents | 1e76331675a1 |
children | 9f8276ac1cdd |
comparison
equal
deleted
inserted
replaced
638:1e76331675a1 | 639:d5e355d9797c |
---|---|
323 result = RunQuery('Encodings/issue49-latin1.query', []) | 323 result = RunQuery('Encodings/issue49-latin1.query', []) |
324 self.assertEqual(1, len(result)) | 324 self.assertEqual(1, len(result)) |
325 self.assertEqual(2, len(result[0])) | 325 self.assertEqual(2, len(result[0])) |
326 tags = ParseTopLevelTags(result[0]) | 326 tags = ParseTopLevelTags(result[0]) |
327 self.assertEqual(expectedEncoding, tags['0008,0005'].decode('ascii')) | 327 self.assertEqual(expectedEncoding, tags['0008,0005'].decode('ascii')) |
328 self.assertEqual(expectedContent, tags['0010,0010'].decode(pythonEncoding)) | 328 if sys.version_info >= (3, 0): |
329 self.assertEqual(expectedContent, tags['0010,0010'].decode(pythonEncoding)) | |
330 else: | |
331 self.assertEqual(expectedContent.decode('utf-8'), tags['0010,0010'].decode(pythonEncoding)) | |
329 | 332 |
330 AddToDatabase('Encodings/issue49-latin1.wl') | 333 AddToDatabase('Encodings/issue49-latin1.wl') |
331 Check('ascii', 'Ascii', 'ISO_IR 6', r'VANILL^LAURA^^^Mme') | 334 Check('ascii', 'Ascii', 'ISO_IR 6', 'VANILL^LAURA^^^Mme') |
332 Check('utf-8', 'Utf8', 'ISO_IR 192', r'VANILLÉ^LAURA^^^Mme') | 335 Check('utf-8', 'Utf8', 'ISO_IR 192', 'VANILLÉ^LAURA^^^Mme') |
333 Check('latin-1', 'Latin1', 'ISO_IR 100', r'VANILLÉ^LAURA^^^Mme') | 336 Check('latin-1', 'Latin1', 'ISO_IR 100', 'VANILLÉ^LAURA^^^Mme') |
334 | 337 |
335 | 338 |
336 def test_format(self): | 339 def test_format(self): |
337 DoPut(ORTHANC, '/tools/default-encoding', 'Latin1') | 340 DoPut(ORTHANC, '/tools/default-encoding', 'Latin1') |
338 AddToDatabase('Dcmtk/Database/wklist1.dump') | 341 AddToDatabase('Dcmtk/Database/wklist1.dump') |