Skip to content

test: add coverage for core orchestrator functions (fixes #19)#111

Merged
nikopueringer merged 13 commits intonikopueringer:mainfrom
Mogi83:fix/coverage-gap
Mar 16, 2026
Merged

test: add coverage for core orchestrator functions (fixes #19)#111
nikopueringer merged 13 commits intonikopueringer:mainfrom
Mogi83:fix/coverage-gap

Conversation

@Mogi83
Copy link
Contributor

@Mogi83 Mogi83 commented Mar 9, 2026

What does this change?

Added test coverage for clip_manager.py addressing gaps identified in Issue #19. Additionally added some mocks for GVM and VideoMaMa back ends in conftest.py. Coverage of clip_manager.py increased from 17% to 51% from the 32 new tests, still more could be implemented for better coverage.

New pull request because I accidentally closed my old one.

How was it tested?

Coverage report generated with pytest-cov:

Name              Stmts   Miss Branch BrPart  Cover
---------------------------------------------------
clip_manager.py     556    269    240     31    51%
---------------------------------------------------
TOTAL               556    269    240     31    51%

Checklist

  • uv run pytest passes 203 tests (+32 in this PR)
  • uv run ruff check passes
  • uv run ruff format --check passes

@Mogi83 Mogi83 changed the title Fix/coverage gap test: Fix/coverage gap Mar 9, 2026
@Mogi83 Mogi83 changed the title test: Fix/coverage gap test: add coverage for core orchestrator functions (fixes #19) Mar 9, 2026
@Mogi83
Copy link
Contributor Author

Mogi83 commented Mar 10, 2026

Looking into this most recent fail.

@Mogi83
Copy link
Contributor Author

Mogi83 commented Mar 10, 2026

All checks pass now, however I wanted to explain the fix I put in place:

Previously test_videomama_cleanup_on_failure was failing on 3.10 because of dynamic local import of a module that isn't on the global sys.path until the function executes. Standard patch() attempts to resolve this path during test setup, which fails in 3.10’s stricter import environment.

The test now uses pytest.raises because load_videomama_model currently sits outside the main try/except safety net in clip_manager.py. While the test is now green, moving this loader inside the error-handling loop is highly recommended to improve stability.

I left a comment for the next maintainer and will consider a PR to fix that issue.

@nikopueringer
Copy link
Owner

Hi Mogi! Going through this, I saw your most recent comment about a test passing, but a suggestion to move a loader inside the error handling loop. Is this something that needs to be addressed before this is merged?

@Mogi83
Copy link
Contributor Author

Mogi83 commented Mar 11, 2026

No, a separate issue should be opened to address what the problem identified by the test. However I will be putting this PR into draft state so I can review and potentially add the tests proposed by #118. I also want to look into some other parts like a potential fixture leakage I saw when developing the CLI tests.

@Mogi83 Mogi83 marked this pull request as draft March 11, 2026 22:52
@HYP3R00T
Copy link
Contributor

Hi @Mogi83 . Could please sync your branch with upstream? I am reviewing your PR locally (gh pr checkout 111) and it seems to fail.

CorridorKey  fix/coverage-gap 1m7s 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                           
❯ uv sync
Resolved 95 packages in 3.50s                                                                                                                                                                   
      Built corridorkey @ file:///D:/CorridorKey
Prepared 4 packages in 4m 00s
Uninstalled 10 packages in 1.63s                                                                                                                                                                
░░░░░░░░░░░░░░░░░░░░ [0/4] Installing wheels...                                                                                                                                                 warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.                                                                                            
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 4 packages in 50.77s
 ~ corridorkey==1.0.0 (from file:///D:/CorridorKey)
 - hypothesis==6.151.9
 - kornia==0.8.2
 - kornia-rs==0.1.10
 - sortedcontainers==2.4.0
 - timm==1.0.25 (from git+https://github.com/Raiden129/pytorch-image-models-fix@fc1dca92c5a44d5436605dacb19594117ce2eb0c)
 + timm==1.0.24
 - torch==2.7.1
 - torch==2.7.1+cu128
 + torch==2.10.0+cu126
 - torchvision==0.22.1
 + torchvision==0.25.0+cu126
 - triton-windows==3.3.1.post21

CorridorKey  fix/coverage-gap [!1] 4m57s 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                     
❯

CorridorKey  fix/coverage-gap [!1] 4m57s 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                     
❯ pytest
===================================================================================== test session starts =====================================================================================
platform win32 -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: D:\CorridorKey
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, cov-7.0.0
collected 204 items                                                                                                                                                                            

tests\test_backend.py .................                                                                                                                                                  [  8%]
tests\test_clip_manager.py ..............................................F......................                                                                                         [ 42%]
tests\test_color_utils.py ......................................................................                                                                                         [ 76%]
tests\test_device_utils.py .....................                                                                                                                                         [ 86%]
tests\test_gamma_consistency.py ........                                                                                                                                                 [ 90%]
tests\test_imports.py ........                                                                                                                                                           [ 94%]
tests\test_inference_engine.py ..........                                                                                                                                                [ 99%]
tests\test_mlx_smoke.py s                                                                                                                                                                [100%]

========================================================================================== FAILURES ===========================================================================================
_______________________________________________________________________ TestVideoMaMa.test_videomama_exr_gamma_handling _______________________________________________________________________
tests\test_clip_manager.py:506: in test_videomama_exr_gamma_handling
    cv2.imwrite(exr_file, img)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
=================================================================================== short test summary info ===================================================================================
FAILED tests/test_clip_manager.py::TestVideoMaMa::test_videomama_exr_gamma_handling - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec i...
========================================================================== 1 failed, 202 passed, 1 skipped in 42.29s ==========================================================================

@HYP3R00T
Copy link
Contributor

Still getting the following errors. I test it with and without cuda.

With Cuda

CorridorKey  fix/coverage-gap 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                                 
❯ uv sync --extra cuda
Resolved 120 packages in 1ms
Prepared 1 package in 1.28s
warning: Failed to uninstall package at .venv\Lib\site-packages\torch-2.7.1+cu128.dist-info due to missing `RECORD` file. Installation may result in an incomplete environment.                  
Uninstalled 3 packages in 1.12s
░░░░░░░░░░░░░░░░░░░░ [0/2] Installing wheels...                                                                                                                                                  warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 2 packages in 1m 14s
 - torch==2.7.1
 ~ torch==2.7.1+cu128
 - torchvision==0.22.1
 + torchvision==0.22.1+cu128

CorridorKey  fix/coverage-gap 1m16s 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                           
❯ pytest
===================================================================================== test session starts ======================================================================================
platform win32 -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: D:\CorridorKey
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, hypothesis-6.151.9, cov-7.0.0
collected 255 items                                                                                                                                                                             

tests\test_backend.py .................                                                                                                                                                   [  6%]
tests\test_cli.py ................                                                                                                                                                        [ 12%]
tests\test_clip_manager.py ..............................................F......................                                                                                          [ 40%]
tests\test_color_utils.py .......................................................................                                                                                         [ 67%]
tests\test_device_utils.py .....................                                                                                                                                          [ 76%]
tests\test_e2e_workflow.py FF.                                                                                                                                                            [ 77%]
tests\test_exr_gamma_bug_condition.py FFF                                                                                                                                                 [ 78%]
tests\test_exr_gamma_preservation.py FF..F                                                                                                                                                [ 80%]
tests\test_gamma_consistency.py ........                                                                                                                                                  [ 83%]
tests\test_imports.py ........                                                                                                                                                            [ 86%]
tests\test_inference_engine.py ...............                                                                                                                                            [ 92%]
tests\test_mlx_smoke.py s                                                                                                                                                                 [ 92%] 
tests\test_pbt_backend_resolution.py .                                                                                                                                                    [ 93%]
tests\test_pbt_dep_preservation.py .                                                                                                                                                      [ 93%]
tests\test_pyproject_structure.py ................                                                                                                                                        [100%]

=========================================================================================== FAILURES =========================================================================================== 
_______________________________________________________________________ TestVideoMaMa.test_videomama_exr_gamma_handling ________________________________________________________________________ 
tests\test_clip_manager.py:506: in test_videomama_exr_gamma_handling
    cv2.imwrite(exr_file, img)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
___________________________________________________________________ TestE2EInferenceWorkflow.test_output_directories_created ___________________________________________________________________ 
tests\test_e2e_workflow.py:62: in test_output_directories_created
    run_inference([entry], device="cpu")
clip_manager.py:759: in run_inference
    cv2.imwrite(os.path.join(fg_dir, f"{input_stem}.exr"), fg_bgr, EXR_WRITE_FLAGS)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
_________________________________________________________________ TestE2EInferenceWorkflow.test_output_files_written_per_frame _________________________________________________________________ 
tests\test_e2e_workflow.py:87: in test_output_files_written_per_frame
    run_inference([entry], device="cpu")
clip_manager.py:759: in run_inference
    cv2.imwrite(os.path.join(fg_dir, f"{input_stem}.exr"), fg_bgr, EXR_WRITE_FLAGS)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
______________________________________________________ TestDefect3NaivePowVsPiecewiseSRGB.test_gamma_corrected_exr_matches_piecewise_srgb ______________________________________________________ 
tests\test_exr_gamma_bug_condition.py:83: in test_gamma_corrected_exr_matches_piecewise_srgb
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_bug_condition.py:92: in test_gamma_corrected_exr_matches_piecewise_srgb
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_gamma_corrected_exr_matches_piecewise_srgb(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect3NaivePowVsPiecewiseSRGB object at 0x000001EA28CD3ED0>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
_____________________________________________________________ TestDefect3NaivePowVsPiecewiseSRGB.test_threshold_region_divergence ______________________________________________________________ 
tests\test_exr_gamma_bug_condition.py:117: in test_threshold_region_divergence
    pixel_val=threshold_pixel_values,
           ^^^^^^^
tests\test_exr_gamma_bug_condition.py:131: in test_threshold_region_divergence
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_threshold_region_divergence(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect3NaivePowVsPiecewiseSRGB object at 0x000001EA2907CE10>,
E       pixel_val=0.0,  # or any other generated value
E   )
__________________________________________________________ TestDefect1And2RunInferenceEXRPath.test_exr_srgb_frame_is_gamma_corrected ___________________________________________________________ 
tests\test_exr_gamma_bug_condition.py:166: in test_exr_srgb_frame_is_gamma_corrected
    @settings(max_examples=30, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_bug_condition.py:185: in test_exr_srgb_frame_is_gamma_corrected
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_exr_srgb_frame_is_gamma_corrected(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect1And2RunInferenceEXRPath object at 0x000001EA2907D090>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
____________________________________________________________ TestPreservationLinearEXRRead.test_exr_default_returns_raw_linear_data ____________________________________________________________ 
tests\test_exr_gamma_preservation.py:87: in test_exr_default_returns_raw_linear_data
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:97: in test_exr_default_returns_raw_linear_data
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_exr_default_returns_raw_linear_data(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRRead object at 0x000001EA2907D1D0>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
________________________________________________________ TestPreservationLinearEXRRead.test_exr_explicit_false_returns_raw_linear_data _________________________________________________________ 
tests\test_exr_gamma_preservation.py:120: in test_exr_explicit_false_returns_raw_linear_data
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:129: in test_exr_explicit_false_returns_raw_linear_data
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_exr_explicit_false_returns_raw_linear_data(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRRead object at 0x000001EA2907D310>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
_________________________________________________________ TestPreservationLinearEXRInference.test_linear_exr_passes_through_unchanged __________________________________________________________ 
tests\test_exr_gamma_preservation.py:220: in test_linear_exr_passes_through_unchanged
    @settings(max_examples=30, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:238: in test_linear_exr_passes_through_unchanged
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_linear_exr_passes_through_unchanged(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRInference object at 0x000001EA2907D950>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
=================================================================================== short test summary info ==================================================================================== 
FAILED tests/test_clip_manager.py::TestVideoMaMa::test_videomama_exr_gamma_handling - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_e2e_workflow.py::TestE2EInferenceWorkflow::test_output_directories_created - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_e2e_workflow.py::TestE2EInferenceWorkflow::test_output_files_written_per_frame - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect3NaivePowVsPiecewiseSRGB::test_gamma_corrected_exr_matches_piecewise_srgb - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect3NaivePowVsPiecewiseSRGB::test_threshold_region_divergence - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect1And2RunInferenceEXRPath::test_exr_srgb_frame_is_gamma_corrected - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRRead::test_exr_default_returns_raw_linear_data - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRRead::test_exr_explicit_false_returns_raw_linear_data - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRInference::test_linear_exr_passes_through_unchanged - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
===================================================================== 9 failed, 245 passed, 1 skipped in 64.13s (0:01:04) ====================================================================== 

CorridorKey  fix/coverage-gap [?36] 1m22s 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                     
❯

Without Cuda

CorridorKey  fix/coverage-gap [?36] 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                           
❯ uv sync
Resolved 120 packages in 2ms
Uninstalled 2 packages in 1.20s
░░░░░░░░░░░░░░░░░░░░ [0/3] Installing wheels...                                                                                                                                                  warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 3 packages in 1m 20s
 + torch==2.7.1
 ~ torch==2.7.1+cu128
 - torchvision==0.22.1+cu128
 + torchvision==0.22.1

CorridorKey  fix/coverage-gap [?36] 1m22s 󰏗 v1.0.0  v3.13.12 (corridorkey)                                                                                                                     
❯ pytest
===================================================================================== test session starts ======================================================================================
platform win32 -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: D:\CorridorKey
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, hypothesis-6.151.9, cov-7.0.0
collected 255 items                                                                                                                                                                             

tests\test_backend.py .................                                                                                                                                                   [  6%]
tests\test_cli.py ................                                                                                                                                                        [ 12%]
tests\test_clip_manager.py ..............................................F......................                                                                                          [ 40%]
tests\test_color_utils.py .......................................................................                                                                                         [ 67%]
tests\test_device_utils.py .....................                                                                                                                                          [ 76%]
tests\test_e2e_workflow.py FF.                                                                                                                                                            [ 77%]
tests\test_exr_gamma_bug_condition.py FFF                                                                                                                                                 [ 78%]
tests\test_exr_gamma_preservation.py FF..F                                                                                                                                                [ 80%]
tests\test_gamma_consistency.py ........                                                                                                                                                  [ 83%]
tests\test_imports.py ........                                                                                                                                                            [ 86%]
tests\test_inference_engine.py ..............s                                                                                                                                            [ 92%]
tests\test_mlx_smoke.py s                                                                                                                                                                 [ 92%] 
tests\test_pbt_backend_resolution.py .                                                                                                                                                    [ 93%]
tests\test_pbt_dep_preservation.py .                                                                                                                                                      [ 93%]
tests\test_pyproject_structure.py ................                                                                                                                                        [100%]

=========================================================================================== FAILURES =========================================================================================== 
_______________________________________________________________________ TestVideoMaMa.test_videomama_exr_gamma_handling ________________________________________________________________________ 
tests\test_clip_manager.py:506: in test_videomama_exr_gamma_handling
    cv2.imwrite(exr_file, img)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
___________________________________________________________________ TestE2EInferenceWorkflow.test_output_directories_created ___________________________________________________________________ 
tests\test_e2e_workflow.py:62: in test_output_directories_created
    run_inference([entry], device="cpu")
clip_manager.py:759: in run_inference
    cv2.imwrite(os.path.join(fg_dir, f"{input_stem}.exr"), fg_bgr, EXR_WRITE_FLAGS)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
_________________________________________________________________ TestE2EInferenceWorkflow.test_output_files_written_per_frame _________________________________________________________________ 
tests\test_e2e_workflow.py:87: in test_output_files_written_per_frame
    run_inference([entry], device="cpu")
clip_manager.py:759: in run_inference
    cv2.imwrite(os.path.join(fg_dir, f"{input_stem}.exr"), fg_bgr, EXR_WRITE_FLAGS)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
______________________________________________________ TestDefect3NaivePowVsPiecewiseSRGB.test_gamma_corrected_exr_matches_piecewise_srgb ______________________________________________________ 
tests\test_exr_gamma_bug_condition.py:83: in test_gamma_corrected_exr_matches_piecewise_srgb
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_bug_condition.py:92: in test_gamma_corrected_exr_matches_piecewise_srgb
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_gamma_corrected_exr_matches_piecewise_srgb(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect3NaivePowVsPiecewiseSRGB object at 0x000001E5C6729A90>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),
E   )
_____________________________________________________________ TestDefect3NaivePowVsPiecewiseSRGB.test_threshold_region_divergence ______________________________________________________________ 
tests\test_exr_gamma_bug_condition.py:117: in test_threshold_region_divergence
    pixel_val=threshold_pixel_values,
           ^^^^^^^
tests\test_exr_gamma_bug_condition.py:131: in test_threshold_region_divergence
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_threshold_region_divergence(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect3NaivePowVsPiecewiseSRGB object at 0x000001E5C697E990>,
E       pixel_val=0.0,
E   )
__________________________________________________________ TestDefect1And2RunInferenceEXRPath.test_exr_srgb_frame_is_gamma_corrected ___________________________________________________________ 
tests\test_exr_gamma_bug_condition.py:166: in test_exr_srgb_frame_is_gamma_corrected
    @settings(max_examples=30, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_bug_condition.py:185: in test_exr_srgb_frame_is_gamma_corrected
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_exr_srgb_frame_is_gamma_corrected(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect1And2RunInferenceEXRPath object at 0x000001E5C697EC10>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),
E   )
____________________________________________________________ TestPreservationLinearEXRRead.test_exr_default_returns_raw_linear_data ____________________________________________________________ 
tests\test_exr_gamma_preservation.py:87: in test_exr_default_returns_raw_linear_data
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:97: in test_exr_default_returns_raw_linear_data
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_exr_default_returns_raw_linear_data(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRRead object at 0x000001E5C697ED50>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),
E   )
________________________________________________________ TestPreservationLinearEXRRead.test_exr_explicit_false_returns_raw_linear_data _________________________________________________________ 
tests\test_exr_gamma_preservation.py:120: in test_exr_explicit_false_returns_raw_linear_data
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:129: in test_exr_explicit_false_returns_raw_linear_data
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_exr_explicit_false_returns_raw_linear_data(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRRead object at 0x000001E5C697EE90>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),
E   )
_________________________________________________________ TestPreservationLinearEXRInference.test_linear_exr_passes_through_unchanged __________________________________________________________ 
tests\test_exr_gamma_preservation.py:220: in test_linear_exr_passes_through_unchanged
    @settings(max_examples=30, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:238: in test_linear_exr_passes_through_unchanged
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E   
E   Falsifying example: test_linear_exr_passes_through_unchanged(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRInference object at 0x000001E5C697F4D0>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E       
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),
E   )
======================================================================================= warnings summary ======================================================================================= 
tests/test_imports.py::test_import_gvm_core
  D:\CorridorKey\.venv\Lib\site-packages\torch\amp\autocast_mode.py:266: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================================================== short test summary info ==================================================================================== 
FAILED tests/test_clip_manager.py::TestVideoMaMa::test_videomama_exr_gamma_handling - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_e2e_workflow.py::TestE2EInferenceWorkflow::test_output_directories_created - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_e2e_workflow.py::TestE2EInferenceWorkflow::test_output_files_written_per_frame - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect3NaivePowVsPiecewiseSRGB::test_gamma_corrected_exr_matches_piecewise_srgb - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect3NaivePowVsPiecewiseSRGB::test_threshold_region_divergence - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect1And2RunInferenceEXRPath::test_exr_srgb_frame_is_gamma_corrected - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRRead::test_exr_default_returns_raw_linear_data - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRRead::test_exr_explicit_false_returns_raw_linear_data - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRInference::test_linear_exr_passes_through_unchanged - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is...
===================================================================== 9 failed, 244 passed, 2 skipped, 1 warning in 26.09s ===================================================================== 

@HYP3R00T
Copy link
Contributor

Tried with uv sync --group dev as well

CorridorKey  fix/coverage-gap 󰏗 v1.0.0  v3.13.6
❯ uv sync --group dev
Resolved 120 packages in 4ms
Uninstalled 2 packages in 1.64s
░░░░░░░░░░░░░░░░░░░░ [0/2] Installing wheels...                                                                                                                              warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 2 packages in 2m 03s
 ~ torch==2.7.1
 ~ torch==2.7.1+cu128

CorridorKey  fix/coverage-gap 󰏗 v1.0.0  v3.13.12 (corridorkey)
❯ pytest
=========================================================================== test session starts ============================================================================
platform win32 -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: D:\CorridorKey
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.12.1, hypothesis-6.151.9, cov-7.0.0
collected 255 items

tests\test_backend.py .................                                                                                                                               [  6%]
tests\test_cli.py ................                                                                                                                                    [ 12%]
tests\test_clip_manager.py ..............................................F......................                                                                      [ 40%]
tests\test_color_utils.py .......................................................................                                                                     [ 67%]
tests\test_device_utils.py .....................                                                                                                                      [ 76%]
tests\test_e2e_workflow.py FF.                                                                                                                                        [ 77%]
tests\test_exr_gamma_bug_condition.py FFF                                                                                                                             [ 78%]
tests\test_exr_gamma_preservation.py FF..F                                                                                                                            [ 80%]
tests\test_gamma_consistency.py ........                                                                                                                              [ 83%]
tests\test_imports.py ........                                                                                                                                        [ 86%]
tests\test_inference_engine.py ...............                                                                                                                        [ 92%]
tests\test_mlx_smoke.py s                                                                                                                                             [ 92%]
tests\test_pbt_backend_resolution.py .                                                                                                                                [ 93%]
tests\test_pbt_dep_preservation.py .                                                                                                                                  [ 93%]
tests\test_pyproject_structure.py ................                                                                                                                    [100%]

================================================================================= FAILURES =================================================================================
_____________________________________________________________ TestVideoMaMa.test_videomama_exr_gamma_handling ______________________________________________________________
tests\test_clip_manager.py:506: in test_videomama_exr_gamma_handling
    cv2.imwrite(exr_file, img)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
_________________________________________________________ TestE2EInferenceWorkflow.test_output_directories_created _________________________________________________________
tests\test_e2e_workflow.py:62: in test_output_directories_created
    run_inference([entry], device="cpu")
clip_manager.py:759: in run_inference
    cv2.imwrite(os.path.join(fg_dir, f"{input_stem}.exr"), fg_bgr, EXR_WRITE_FLAGS)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
_______________________________________________________ TestE2EInferenceWorkflow.test_output_files_written_per_frame _______________________________________________________
tests\test_e2e_workflow.py:87: in test_output_files_written_per_frame
    run_inference([entry], device="cpu")
clip_manager.py:759: in run_inference
    cv2.imwrite(os.path.join(fg_dir, f"{input_stem}.exr"), fg_bgr, EXR_WRITE_FLAGS)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
____________________________________________ TestDefect3NaivePowVsPiecewiseSRGB.test_gamma_corrected_exr_matches_piecewise_srgb ____________________________________________
tests\test_exr_gamma_bug_condition.py:83: in test_gamma_corrected_exr_matches_piecewise_srgb
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_bug_condition.py:92: in test_gamma_corrected_exr_matches_piecewise_srgb
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E
E   Falsifying example: test_gamma_corrected_exr_matches_piecewise_srgb(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect3NaivePowVsPiecewiseSRGB object at 0x000001F1E6958B90>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
___________________________________________________ TestDefect3NaivePowVsPiecewiseSRGB.test_threshold_region_divergence ____________________________________________________
tests\test_exr_gamma_bug_condition.py:117: in test_threshold_region_divergence
    pixel_val=threshold_pixel_values,
           ^^^^^^^
tests\test_exr_gamma_bug_condition.py:131: in test_threshold_region_divergence
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E
E   Falsifying example: test_threshold_region_divergence(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect3NaivePowVsPiecewiseSRGB object at 0x000001F1E6CFDA90>,
E       pixel_val=0.0,  # or any other generated value
E   )
________________________________________________ TestDefect1And2RunInferenceEXRPath.test_exr_srgb_frame_is_gamma_corrected _________________________________________________
tests\test_exr_gamma_bug_condition.py:166: in test_exr_srgb_frame_is_gamma_corrected
    @settings(max_examples=30, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_bug_condition.py:185: in test_exr_srgb_frame_is_gamma_corrected
    _write_exr(exr_path, data)
tests\test_exr_gamma_bug_condition.py:67: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E
E   Falsifying example: test_exr_srgb_frame_is_gamma_corrected(
E       self=<tests.test_exr_gamma_bug_condition.TestDefect1And2RunInferenceEXRPath object at 0x000001F1E6CFDD10>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
__________________________________________________ TestPreservationLinearEXRRead.test_exr_default_returns_raw_linear_data __________________________________________________
tests\test_exr_gamma_preservation.py:87: in test_exr_default_returns_raw_linear_data
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:97: in test_exr_default_returns_raw_linear_data
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E
E   Falsifying example: test_exr_default_returns_raw_linear_data(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRRead object at 0x000001F1E6CFDE50>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
______________________________________________ TestPreservationLinearEXRRead.test_exr_explicit_false_returns_raw_linear_data _______________________________________________
tests\test_exr_gamma_preservation.py:120: in test_exr_explicit_false_returns_raw_linear_data
    @settings(max_examples=50, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:129: in test_exr_explicit_false_returns_raw_linear_data
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E
E   Falsifying example: test_exr_explicit_false_returns_raw_linear_data(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRRead object at 0x000001F1E6CFDF90>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
_______________________________________________ TestPreservationLinearEXRInference.test_linear_exr_passes_through_unchanged ________________________________________________
tests\test_exr_gamma_preservation.py:220: in test_linear_exr_passes_through_unchanged
    @settings(max_examples=30, deadline=None)
               ^^^^^^^
tests\test_exr_gamma_preservation.py:238: in test_linear_exr_passes_through_unchanged
    _write_exr(exr_path, data)
tests\test_exr_gamma_preservation.py:64: in _write_exr
    cv2.imwrite(path, bgr)
E   cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'cv::initOpenEXR'
E
E   Falsifying example: test_linear_exr_passes_through_unchanged(
E       self=<tests.test_exr_gamma_preservation.TestPreservationLinearEXRInference object at 0x000001F1E6CFE5D0>,
E       data=array([[[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]],
E
E              [[0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.],
E               [0., 0., 0.]]], dtype=float32),  # or any other generated value
E   )
========================================================================= short test summary info ==========================================================================
FAILED tests/test_clip_manager.py::TestVideoMaMa::test_videomama_exr_gamma_handling - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_e2e_workflow.py::TestE2EInferenceWorkflow::test_output_directories_created - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_e2e_workflow.py::TestE2EInferenceWorkflow::test_output_files_written_per_frame - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect3NaivePowVsPiecewiseSRGB::test_gamma_corrected_exr_matches_piecewise_srgb - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect3NaivePowVsPiecewiseSRGB::test_threshold_region_divergence - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_exr_gamma_bug_condition.py::TestDefect1And2RunInferenceEXRPath::test_exr_srgb_frame_is_gamma_corrected - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRRead::test_exr_default_returns_raw_linear_data - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRRead::test_exr_explicit_false_returns_raw_linear_data - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
FAILED tests/test_exr_gamma_preservation.py::TestPreservationLinearEXRInference::test_linear_exr_passes_through_unchanged - cv2.error: OpenCV(4.13.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcode...
================================================================ 9 failed, 245 passed, 1 skipped in 55.56s =================================================================

@Mogi83
Copy link
Contributor Author

Mogi83 commented Mar 16, 2026

After some discussion on discord with @HYP3R00T the errors in testing is a problem on their local machine, not as a result of this PR.

@Mogi83 Mogi83 marked this pull request as ready for review March 16, 2026 04:18
@nikopueringer nikopueringer merged commit be34afa into nikopueringer:main Mar 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants