mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 06:56:18 -05:00
Moving map function test into lib tests.
This commit is contained in:
parent
560b607492
commit
3d6ad99f5b
2 changed files with 13 additions and 19 deletions
|
|
@ -65,3 +65,16 @@ async def test_run_import_command(test_directory, mock_create_subprocess_shell):
|
|||
with pytest.raises(ValueError) as e:
|
||||
await lib.run_import_command(dump_file, dump_file)
|
||||
assert 'more than one' in str(e)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('size,expected', [
|
||||
(0, 0),
|
||||
(-1, 0),
|
||||
(17737381, 286),
|
||||
(63434267, 1025),
|
||||
(87745484, 1418),
|
||||
(136372996, 2203),
|
||||
(116318111, 1879),
|
||||
])
|
||||
def test_seconds_to_import_rpi4(size, expected):
|
||||
assert lib.seconds_to_import(size) == expected
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
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, 286),
|
||||
(63434267, 1025),
|
||||
(87745484, 1418),
|
||||
(136372996, 2203),
|
||||
(116318111, 1879),
|
||||
])
|
||||
def test_seconds_to_import_rpi4(size, expected):
|
||||
assert modules.map.lib.seconds_to_import(size) == expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue