annotate test_utils.py @ 6:22bb32eae6a1 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
author imgteam
date Thu, 06 Nov 2025 09:59:34 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
1 import unittest
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
2
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
3 import points2label
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
4
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
5
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
6 class get_list_depth(unittest.TestCase):
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
7
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
8 def test(self):
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
9 self.assertEqual(points2label.get_list_depth(1234), 0)
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
10 self.assertEqual(points2label.get_list_depth([]), 1)
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
11 self.assertEqual(points2label.get_list_depth([1, 2, 3]), 1)
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
12 self.assertEqual(points2label.get_list_depth([1, [2, 3]]), 2)
22bb32eae6a1 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
13 self.assertEqual(points2label.get_list_depth([[1], [2, 3]]), 2)