def test_kapture_format_version_from_disk(self): kapture_data = kapture.Kapture() kapture_data.sensors = kapture.Sensors() csv.kapture_to_dir(self._tempdir.name, kapture_data) version = csv.kapture_format_version(self._tempdir.name) self.assertEqual(csv.current_format_version(), version, "We have the current version")
def test_sensor_file_version(self): cam0 = kapture.Camera(name='cam0', camera_type='SIMPLE_PINHOLE', camera_params=[640, 480, 100, 320, 240]) sensors = kapture.Sensors() sensors['cam0'] = cam0 csv.sensors_to_file(self._temp_filepath, sensors) version = csv.get_version_from_csv_file(self._temp_filepath) current_version = csv.current_format_version() self.assertEqual(current_version, version, "Version correctly stored")