User can select from/to years when searching files. Indexing doc and docx files.

This commit is contained in:
Roland 2024-03-06 17:41:04 -07:00
parent 758ff8e810
commit 00fe799b8f
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
40 changed files with 880 additions and 159 deletions

View file

@ -1,3 +1,4 @@
import unittest.mock
from unittest import mock
import pytest
@ -82,3 +83,21 @@ async def test_run_import_command(test_directory, mock_create_subprocess_shell):
])
def test_seconds_to_import_rpi4(size, expected):
assert lib.seconds_to_import(size) == expected
@pytest.mark.parametrize('size,expected', [
(0, 0),
(-1, 0),
(17737381, 130),
(63434267, 466),
(87745484, 645),
(116318111, 855),
(136372996, 1002),
(1936075318, 14235),
(2676094489, 19676),
(3392375001, 24943),
(11346305075, 188040),
])
def test_seconds_to_import_rpi5(size, expected):
with unittest.mock.patch('modules.map.lib.IS_RPI5', True):
assert lib.seconds_to_import(size) == expected