amietn / vcsi

Create video contact sheets, thumbnails
MIT License
471 stars 57 forks source link

update tests/ for pytest #106

Closed juippis closed 1 year ago

juippis commented 1 year ago

Note: I have no idea what I'm doing.

I used https://pypi.org/project/nose2pytest/, manually removed from nose.tools import..., manually added import pytest, manually sed'd assert_raises to pytest.raises, and with these tests pass for me.

python3.8 -m pytest -vv -ra -l -Wdefault --color=no -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb
======================================== test session starts ========================================
platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0 -- /usr/bin/python3.8
cachedir: .pytest_cache
rootdir: /var/tmp/portage/media-video/vcsi-7.0.13-r1/work/vcsi-264f89402c2a6d71e2db6693e802b82f5b8d3fd9
plugins: pkgcore-0.12.16, nose2pytest-1.0.8
collecting ... collected 34 items

tests/test_input.py::test_grid_default PASSED                                                [ 1/34]
tests/test_input.py::test_grid_equality PASSED                                               [ 2/34]
tests/test_input.py::test_grid_inequality PASSED                                             [ 3/34]
tests/test_input.py::test_grid_columns_integer PASSED                                        [ 4/34]
tests/test_input.py::test_grid_columns_positive PASSED                                       [ 5/34]
tests/test_input.py::test_grid_rows_integer PASSED                                           [ 6/34]
tests/test_input.py::test_grid_rows_positive PASSED                                          [ 7/34]
tests/test_input.py::test_grid_format PASSED                                                 [ 8/34]
tests/test_input.py::test_hex_color_type PASSED                                              [ 9/34]
tests/test_input.py::test_manual_timestamps PASSED                                           [10/34]
tests/test_input.py::test_timestamp_position_type PASSED                                     [11/34]
tests/test_input.py::test_interval_type PASSED                                               [12/34]
tests/test_input.py::test_comma_separated_string_type PASSED                                 [13/34]
tests/test_input.py::test_metadata_position_type PASSED                                      [14/34]
tests/test_input.py::test_cleanup PASSED                                                     [15/34]
tests/test_input.py::test_save_image PASSED                                                  [16/34]
tests/test_input.py::test_compute_timestamp_position PASSED                                  [17/34]
tests/test_input.py::test_max_line_length PASSED                                             [18/34]
tests/test_input.py::test_draw_metadata PASSED                                               [19/34]
tests/test_input.py::test_grid PASSED                                                        [20/34]
tests/test_input.py::test_color PASSED                                                       [21/34]
tests/test_mediainfo.py::test_compute_display_resolution PASSED                              [22/34]
tests/test_mediainfo.py::test_filename PASSED                                                [23/34]
tests/test_mediainfo.py::test_duration PASSED                                                [24/34]
tests/test_mediainfo.py::test_pretty_duration PASSED                                         [25/34]
tests/test_mediainfo.py::test_size_bytes PASSED                                              [26/34]
tests/test_mediainfo.py::test_size PASSED                                                    [27/34]
tests/test_mediainfo.py::test_template_attributes PASSED                                     [28/34]
tests/test_mediainfo.py::test_grid_desired_size PASSED                                       [29/34]
tests/test_mediainfo.py::test_desired_size PASSED                                            [30/34]
tests/test_mediainfo.py::test_timestamps PASSED                                              [31/34]
tests/test_mediainfo.py::test_pretty_duration_centis_limit PASSED                            [32/34]
tests/test_mediainfo.py::test_pretty_duration_millis_limit PASSED                            [33/34]
tests/test_mediainfo.py::test_pretty_to_seconds PASSED                                       [34/34]

======================================== 34 passed in 0.22s =========================================
python3.9 -m pytest -vv -ra -l -Wdefault --color=no -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb
======================================== test session starts ========================================
platform linux -- Python 3.9.15, pytest-7.2.0, pluggy-1.0.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /var/tmp/portage/media-video/vcsi-7.0.13-r1/work/vcsi-264f89402c2a6d71e2db6693e802b82f5b8d3fd9
plugins: pkgcore-0.12.16
collecting ... collected 34 items

tests/test_input.py::test_grid_default PASSED                                                [ 1/34]
tests/test_input.py::test_grid_equality PASSED                                               [ 2/34]
tests/test_input.py::test_grid_inequality PASSED                                             [ 3/34]
tests/test_input.py::test_grid_columns_integer PASSED                                        [ 4/34]
tests/test_input.py::test_grid_columns_positive PASSED                                       [ 5/34]
tests/test_input.py::test_grid_rows_integer PASSED                                           [ 6/34]
tests/test_input.py::test_grid_rows_positive PASSED                                          [ 7/34]
tests/test_input.py::test_grid_format PASSED                                                 [ 8/34]
tests/test_input.py::test_hex_color_type PASSED                                              [ 9/34]
tests/test_input.py::test_manual_timestamps PASSED                                           [10/34]
tests/test_input.py::test_timestamp_position_type PASSED                                     [11/34]
tests/test_input.py::test_interval_type PASSED                                               [12/34]
tests/test_input.py::test_comma_separated_string_type PASSED                                 [13/34]
tests/test_input.py::test_metadata_position_type PASSED                                      [14/34]
tests/test_input.py::test_cleanup PASSED                                                     [15/34]
tests/test_input.py::test_save_image PASSED                                                  [16/34]
tests/test_input.py::test_compute_timestamp_position PASSED                                  [17/34]
tests/test_input.py::test_max_line_length PASSED                                             [18/34]
tests/test_input.py::test_draw_metadata PASSED                                               [19/34]
tests/test_input.py::test_grid PASSED                                                        [20/34]
tests/test_input.py::test_color PASSED                                                       [21/34]
tests/test_mediainfo.py::test_compute_display_resolution PASSED                              [22/34]
tests/test_mediainfo.py::test_filename PASSED                                                [23/34]
tests/test_mediainfo.py::test_duration PASSED                                                [24/34]
tests/test_mediainfo.py::test_pretty_duration PASSED                                         [25/34]
tests/test_mediainfo.py::test_size_bytes PASSED                                              [26/34]
tests/test_mediainfo.py::test_size PASSED                                                    [27/34]
tests/test_mediainfo.py::test_template_attributes PASSED                                     [28/34]
tests/test_mediainfo.py::test_grid_desired_size PASSED                                       [29/34]
tests/test_mediainfo.py::test_desired_size PASSED                                            [30/34]
tests/test_mediainfo.py::test_timestamps PASSED                                              [31/34]
tests/test_mediainfo.py::test_pretty_duration_centis_limit PASSED                            [32/34]
tests/test_mediainfo.py::test_pretty_duration_millis_limit PASSED                            [33/34]
tests/test_mediainfo.py::test_pretty_to_seconds PASSED                                       [34/34]

======================================== 34 passed in 0.24s =========================================
python3.10 -m pytest -vv -ra -l -Wdefault --color=no -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb
======================================== test session starts ========================================
platform linux -- Python 3.10.8, pytest-7.2.0, pluggy-1.0.0 -- /usr/bin/python3.10
cachedir: .pytest_cache
rootdir: /var/tmp/portage/media-video/vcsi-7.0.13-r1/work/vcsi-264f89402c2a6d71e2db6693e802b82f5b8d3fd9
plugins: pkgcore-0.12.16
collecting ... collected 34 items

tests/test_input.py::test_grid_default PASSED                                                [ 1/34]
tests/test_input.py::test_grid_equality PASSED                                               [ 2/34]
tests/test_input.py::test_grid_inequality PASSED                                             [ 3/34]
tests/test_input.py::test_grid_columns_integer PASSED                                        [ 4/34]
tests/test_input.py::test_grid_columns_positive PASSED                                       [ 5/34]
tests/test_input.py::test_grid_rows_integer PASSED                                           [ 6/34]
tests/test_input.py::test_grid_rows_positive PASSED                                          [ 7/34]
tests/test_input.py::test_grid_format PASSED                                                 [ 8/34]
tests/test_input.py::test_hex_color_type PASSED                                              [ 9/34]
tests/test_input.py::test_manual_timestamps PASSED                                           [10/34]
tests/test_input.py::test_timestamp_position_type PASSED                                     [11/34]
tests/test_input.py::test_interval_type PASSED                                               [12/34]
tests/test_input.py::test_comma_separated_string_type PASSED                                 [13/34]
tests/test_input.py::test_metadata_position_type PASSED                                      [14/34]
tests/test_input.py::test_cleanup PASSED                                                     [15/34]
tests/test_input.py::test_save_image PASSED                                                  [16/34]
tests/test_input.py::test_compute_timestamp_position PASSED                                  [17/34]
tests/test_input.py::test_max_line_length PASSED                                             [18/34]
tests/test_input.py::test_draw_metadata PASSED                                               [19/34]
tests/test_input.py::test_grid PASSED                                                        [20/34]
tests/test_input.py::test_color PASSED                                                       [21/34]
tests/test_mediainfo.py::test_compute_display_resolution PASSED                              [22/34]
tests/test_mediainfo.py::test_filename PASSED                                                [23/34]
tests/test_mediainfo.py::test_duration PASSED                                                [24/34]
tests/test_mediainfo.py::test_pretty_duration PASSED                                         [25/34]
tests/test_mediainfo.py::test_size_bytes PASSED                                              [26/34]
tests/test_mediainfo.py::test_size PASSED                                                    [27/34]
tests/test_mediainfo.py::test_template_attributes PASSED                                     [28/34]
tests/test_mediainfo.py::test_grid_desired_size PASSED                                       [29/34]
tests/test_mediainfo.py::test_desired_size PASSED                                            [30/34]
tests/test_mediainfo.py::test_timestamps PASSED                                              [31/34]
tests/test_mediainfo.py::test_pretty_duration_centis_limit PASSED                            [32/34]
tests/test_mediainfo.py::test_pretty_duration_millis_limit PASSED                            [33/34]
tests/test_mediainfo.py::test_pretty_to_seconds PASSED                                       [34/34]

======================================== 34 passed in 0.23s =========================================
amietn commented 1 year ago

Thanks!