Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression test for missing frames after exporting a CVAT dataset #8827

Merged
merged 12 commits into from
Dec 19, 2024
Prev Previous commit
Next Next commit
add fixtures for reseting db and cache per function
  • Loading branch information
Oleg Valiulin committed Dec 16, 2024
commit 31963ef52b900b0f358bff9498a98fbb68fadf9f
4 changes: 3 additions & 1 deletion tests/python/rest_api/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,8 @@ def test_datumaro_export_without_annotations_includes_image_info(
if "size" in related_image:
assert tuple(related_image["size"]) > (0, 0)

@pytest.mark.usefixtures("restore_db_per_function")
@pytest.mark.usefixtures("restore_redis_ondisk_per_function")
@pytest.mark.parametrize(
"format_name, num_frames, frame_step, expected_frames",
[
Expand Down Expand Up @@ -1060,7 +1062,7 @@ def test_export_with_non_default_frame_step(

def get_png_index(zinfo: zipfile.ZipInfo) -> int:
name = PurePosixPath(zinfo.filename)
if name.suffix.lower() != ".png":
if name.suffix.lower() != ".png": # png is usually for video
return -1
name = os.path.basename(name).removesuffix(name.suffix)
idx = name[name.rfind("_") + 1 :]
Expand Down
Loading