mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 16:06:19 -05:00
User can select from/to years when searching files. Indexing doc and docx files.
This commit is contained in:
parent
758ff8e810
commit
00fe799b8f
40 changed files with 880 additions and 159 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue