annotate test_utils.py @ 5:dc91192a7150 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:19 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
dc91192a7150 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
1 import unittest
dc91192a7150 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
2
dc91192a7150 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
3 import points2label
dc91192a7150 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
4
dc91192a7150 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
5
dc91192a7150 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):
dc91192a7150 planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2labelimage/ commit edac062b00490276ef00d094e0594abdb3a3f23c
imgteam
parents:
diff changeset
7
dc91192a7150 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):
dc91192a7150 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)
dc91192a7150 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)
dc91192a7150 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)
dc91192a7150 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)
dc91192a7150 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)