From 3d6ad99f5bc72b15b282922f6858915655bb4855 Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 19 Aug 2023 20:38:23 -0600 Subject: [PATCH] Moving map function test into lib tests. --- modules/map/test/test_lib.py | 13 +++++++++++++ modules/map/test/test_models.py | 19 ------------------- 2 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 modules/map/test/test_models.py diff --git a/modules/map/test/test_lib.py b/modules/map/test/test_lib.py index d464e08b..4573b1de 100644 --- a/modules/map/test/test_lib.py +++ b/modules/map/test/test_lib.py @@ -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 diff --git a/modules/map/test/test_models.py b/modules/map/test/test_models.py deleted file mode 100644 index be1e34f7..00000000 --- a/modules/map/test/test_models.py +++ /dev/null @@ -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