Skip to content

Commit 9d4e417

Browse files
Philippe RerolePhilippe Rerole
authored andcommitted
Renamed tests and test data for import_images_list_with_poses
1 parent fbebd4b commit 9d4e417

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
File renamed without changes.
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,60 +10,60 @@
1010
from kapture.algo.compare import equal_kapture
1111
from kapture.io.csv import kapture_from_dir
1212
from kapture.io.records import TransferAction
13-
from tools.kapture_import_localized_images import import_localized_images
13+
from tools.kapture_import_image_list_with_poses import import_image_list_with_poses
1414

1515

1616
class TestImageList(unittest.TestCase):
1717

1818
def setUp(self):
1919
self._samples_folder = path.abspath(path.join(path.dirname(__file__), '../samples/cour_carree_markers/'))
20-
self._localized_file = path.join(self._samples_folder, 'map/localized_images.txt')
20+
self._images_list_with_poses_file = path.join(self._samples_folder, 'map/images_with_poses.txt')
2121
self._images_folder = path.join(self._samples_folder, 'map')
2222
self._camera_model_path = path.join(path.join(self._samples_folder, 'map'), 's10.yml')
2323
self._tempdir = tempfile.TemporaryDirectory()
2424
self._kapture_path = path.join(self._tempdir.name, 'kapture_local')
2525
os.makedirs(self._kapture_path, exist_ok=True)
2626

2727
def test_import_images_missing_file(self):
28-
self.assertRaises(FileNotFoundError, import_localized_images,
28+
self.assertRaises(FileNotFoundError, import_image_list_with_poses,
2929
'', self._images_folder, self._camera_model_path,
3030
self._kapture_path, True, TransferAction.copy)
3131

3232
def test_import_images_missing_dir(self):
33-
self.assertRaises(ValueError, import_localized_images,
34-
self._localized_file, '', self._camera_model_path,
33+
self.assertRaises(ValueError, import_image_list_with_poses,
34+
self._images_list_with_poses_file, '', self._camera_model_path,
3535
self._kapture_path, True, TransferAction.copy)
3636

3737
def test_import_with_images(self):
38-
import_localized_images(self._localized_file, self._images_folder, self._camera_model_path,
39-
self._kapture_path, True, TransferAction.copy)
38+
import_image_list_with_poses(self._images_list_with_poses_file, self._images_folder, self._camera_model_path,
39+
self._kapture_path, True, TransferAction.copy)
4040

4141
ref_kapture_path = path.join(self._samples_folder, 'kapture_images')
4242
expected_kapture = kapture_from_dir(ref_kapture_path)
4343
imported_kapture = kapture_from_dir(self._kapture_path)
4444
self.assertTrue(equal_kapture(imported_kapture, expected_kapture))
4545

4646
def test_import_images_no_camera(self):
47-
import_localized_images(self._localized_file, self._images_folder, '',
48-
self._kapture_path, True, TransferAction.copy)
47+
import_image_list_with_poses(self._images_list_with_poses_file, self._images_folder, '',
48+
self._kapture_path, True, TransferAction.copy)
4949

5050
ref_kapture_path = path.join(self._samples_folder, 'kapture_images_no_camera')
5151
expected_kapture = kapture_from_dir(ref_kapture_path)
5252
imported_kapture = kapture_from_dir(self._kapture_path)
5353
self.assertTrue(equal_kapture(imported_kapture, expected_kapture))
5454

5555
def test_import_no_images(self):
56-
import_localized_images(self._localized_file, '', self._camera_model_path,
57-
self._kapture_path, True, TransferAction.copy, True)
56+
import_image_list_with_poses(self._images_list_with_poses_file, '', self._camera_model_path,
57+
self._kapture_path, True, TransferAction.copy, True)
5858

5959
ref_kapture_path = path.join(self._samples_folder, 'kapture_no_images')
6060
expected_kapture = kapture_from_dir(ref_kapture_path)
6161
imported_kapture = kapture_from_dir(self._kapture_path)
6262
self.assertTrue(equal_kapture(imported_kapture, expected_kapture))
6363

6464
def test_import_no_images_nor_camera(self):
65-
import_localized_images(self._localized_file, '', '',
66-
self._kapture_path, True, TransferAction.copy, True)
65+
import_image_list_with_poses(self._images_list_with_poses_file, '', '',
66+
self._kapture_path, True, TransferAction.copy, True)
6767

6868
ref_kapture_path = path.join(self._samples_folder, 'kapture_no_images_nor_camera')
6969
expected_kapture = kapture_from_dir(ref_kapture_path)

0 commit comments

Comments
 (0)