Mercurial > hg > orthanc-tests
changeset 670:54d382626bfd
fix WSI tests for new version
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 26 Aug 2024 12:21:26 +0200 |
parents | 36c00333f6ef |
children | b50b6acc1206 |
files | Plugins/WSI/Run.py |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/WSI/Run.py Fri Jul 12 14:07:49 2024 +0200 +++ b/Plugins/WSI/Run.py Mon Aug 26 12:21:26 2024 +0200 @@ -460,12 +460,21 @@ self.assertEqual(512, info['height']) self.assertEqual(3, len(info['sizes'])) - self.assertEqual(512, info['sizes'][0]['width']) - self.assertEqual(512, info['sizes'][0]['height']) - self.assertEqual(256, info['sizes'][1]['width']) - self.assertEqual(256, info['sizes'][1]['height']) - self.assertEqual(128, info['sizes'][2]['width']) - self.assertEqual(128, info['sizes'][2]['height']) + + if IsPluginVersionAbove(ORTHANC, "wsi", 2, 1, 0): # https://orthanc.uclouvain.be/hg/orthanc-wsi/rev/9dc7f1e8716d + self.assertEqual(512, info['sizes'][2]['width']) + self.assertEqual(512, info['sizes'][2]['height']) + self.assertEqual(256, info['sizes'][1]['width']) + self.assertEqual(256, info['sizes'][1]['height']) + self.assertEqual(128, info['sizes'][0]['width']) + self.assertEqual(128, info['sizes'][0]['height']) + else: + self.assertEqual(512, info['sizes'][0]['width']) + self.assertEqual(512, info['sizes'][0]['height']) + self.assertEqual(256, info['sizes'][1]['width']) + self.assertEqual(256, info['sizes'][1]['height']) + self.assertEqual(128, info['sizes'][2]['width']) + self.assertEqual(128, info['sizes'][2]['height']) self.assertEqual(1, len(info['tiles'])) self.assertEqual(128, info['tiles'][0]['width'])