Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.07k stars 1.51k forks source link

Test suite fails for most Windows, Linux tests #2183

Open keikoro opened 1 month ago

keikoro commented 1 month ago

test_rotate starts failing at some point in most Windows and Linux versions.

The only (Python) versions for which tests pass are:

Versions which fail:

Excerpt from log for Linux 3.8:

=========================== short test summary info ============================
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-deg--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-deg-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-deg-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-deg-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-rad--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-rad-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-rad-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bilinear-rad-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-deg--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-deg-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-deg-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-deg-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-rad--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-rad-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-rad-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-nearest-rad-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-deg--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-deg-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-deg-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-deg-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-rad--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-rad-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-rad-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate5-None-bg_color5-expected_frames5-bicubic-rad-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-deg--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-deg-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-deg-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-deg-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-rad--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-rad-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-rad-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bilinear-rad-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-deg--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-deg-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-deg-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-deg-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-rad--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-rad-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-rad-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-nearest-rad-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-deg--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-deg-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-deg-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-deg-720-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-rad--360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-rad-0-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-rad-360-True]
FAILED tests/test_fx.py::test_rotate[45-translate6-center6-bg_color6-expected_frames6-bicubic-rad-720-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-deg--360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-deg-0-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-deg-360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-deg-720-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-rad--360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-rad-0-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-rad-360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bilinear-rad-720-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-deg--360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-deg-0-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-deg-360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-deg-720-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-rad--360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-rad-0-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-rad-360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-nearest-rad-720-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-deg--360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-deg-0-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-deg-360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-deg-720-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-rad--360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-rad-0-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-rad-360-True]
FAILED tests/test_fx.py::test_rotate[135-translate7-None-bg_color7-expected_frames7-bicubic-rad-720-True]
========== 72 failed, 1005 passed, 18 skipped, 232 warnings in 48.63s ==========
antonpetrov145 commented 3 weeks ago

Most of these fail with error like this

(141.0, 121.0, 177.0) is not in list

Do we need to have them like this in the default dict?

DEFAULT_COLOR_DICT = {
        "R": (255, 0, 0),
        "G": (0, 255, 0),
        "B": (0, 0, 255),
        "O": (0, 0, 0),
        "W": (255, 255, 255),
        "A": (89, 225, 62),
        "C": (113, 157, 108),
        "D": (215, 182, 143),
        "E": (57, 26, 252),
        "F": (225, 135, 33),
        "H": (39.0, 55.0, 203.0),
        "I": (31.0, 79.0, 186.0),
        "J": (96.0, 134.0, 129.0)
    }

lists for compare with to_bitmap and bitmap lists look like these, tested with setting G on exception handling

['OOOAOO', 'OOAGGO', 'OAGGCO', 'OGGCOO', 'OOCOOO']
['OOODOO', 'OOGGGO', 'OGGGGO', 'OGGGOO', 'OOCOOO']

['GGGGGG', 'GGGGGG', 'GGGGGG', 'GGGGGG', 'GGGGGG', 'GGGGGG']
['GGGGGG', 'GGGGGG', 'GGGGGG', 'GGGGGG', 'GGGGGG', 'GGGGGG']
antonpetrov145 commented 3 weeks ago

ok after some debugging, seems the issue was that pillow was newest version, lowering it to 9.5.0 all tests are passing