Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
SVivdich02 committed Jan 3, 2024
1 parent f14706b commit 49cbe2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
)

real_init_map_size = sum(
len(kitti.get_point_cloud(i).points) for i in range(config.start_index, config.end_index)
len(kitti.get_point_cloud(i).points)
for i in range(config.start_index, config.end_index)
)

real_image_count = config.end_index - (config.start_index - config.start_image_index_offset)
real_image_count = config.end_index - (
config.start_index - config.start_image_index_offset
)
3 changes: 2 additions & 1 deletion tests/test_init_instances_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
from tests.test_data import real_image_count
from tests.utils import generate_init_pcd


@pytest.mark.parametrize("init_pcd", [generate_init_pcd(config)])
def test_init_map(init_pcd : o3d.geometry.PointCloud):
def test_init_map(init_pcd: o3d.geometry.PointCloud):
points2instances = InitInstancesMatrixProcessor().process(config, init_pcd)

assert points2instances.shape == (len(init_pcd.points), real_image_count)
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

from services.preprocessing.common.config import ConfigDTO

def generate_init_pcd(config : ConfigDTO):

def generate_init_pcd(config: ConfigDTO):
map_wc = o3d.geometry.PointCloud()

for i in range(config.start_index, config.end_index):
Expand Down

0 comments on commit 49cbe2c

Please sign in to comment.