Using flags.map_importing to handle map importing control. Updating RPi 4 map import estimate using create import tests, rather than slower append import tests.

This commit is contained in:
Roland 2023-08-17 08:27:49 -06:00
parent 6405188a98
commit 6376e6539b
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
9 changed files with 130 additions and 94 deletions

View file

@ -2,17 +2,18 @@ from pathlib import Path
import pytest
import modules.map.lib
from modules.map import models
@pytest.mark.parametrize('size,expected', [
(0, 0),
(-1, 0),
(17737381, 4498),
(63434267, 16087),
(87745484, 22253),
(136372996, 34586),
(116318111, 29499),
(17737381, 252),
(63434267, 904),
(87745484, 1251),
(136372996, 1944),
(116318111, 1658),
])
def test_seconds_to_import_rpi4(size, expected):
assert models.seconds_to_import(Path('file.osm.pbf'), size) == expected
assert modules.map.lib.seconds_to_import(size) == expected