Mercurial > hg > orthanc-tests
changeset 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 ac88ebf92e83 |
files | Plugins/Worklists/Run.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Worklists/Run.py Tue Apr 02 19:54:53 2024 +0200 +++ b/Plugins/Worklists/Run.py Tue Apr 02 20:11:09 2024 +0200 @@ -325,12 +325,15 @@ self.assertEqual(2, len(result[0])) tags = ParseTopLevelTags(result[0]) self.assertEqual(expectedEncoding, tags['0008,0005'].decode('ascii')) - self.assertEqual(expectedContent, tags['0010,0010'].decode(pythonEncoding)) + if sys.version_info >= (3, 0): + self.assertEqual(expectedContent, tags['0010,0010'].decode(pythonEncoding)) + else: + self.assertEqual(expectedContent.decode('utf-8'), tags['0010,0010'].decode(pythonEncoding)) AddToDatabase('Encodings/issue49-latin1.wl') - Check('ascii', 'Ascii', 'ISO_IR 6', r'VANILL^LAURA^^^Mme') - Check('utf-8', 'Utf8', 'ISO_IR 192', r'VANILLÉ^LAURA^^^Mme') - Check('latin-1', 'Latin1', 'ISO_IR 100', r'VANILLÉ^LAURA^^^Mme') + Check('ascii', 'Ascii', 'ISO_IR 6', 'VANILL^LAURA^^^Mme') + Check('utf-8', 'Utf8', 'ISO_IR 192', 'VANILLÉ^LAURA^^^Mme') + Check('latin-1', 'Latin1', 'ISO_IR 100', 'VANILLÉ^LAURA^^^Mme') def test_format(self):