job board checkpoint

This commit is contained in:
evilchili committed 2023-09-01 18:41:19 -07:00
1 parent 0d2662a2b6
commit 4bf15b8b4f
4 files changed
+112 -5

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import pytest
from site_tools import jobs
@pytest.mark.parametrize('value, step, expected', [
(0, 50, 50),
(49, 50, 50),
(51, 50, 50),
(99, 50, 100),
(100, 50, 100),
(101, 50, 100),
(124, 50, 100),
(125, 50, 100),
(126, 50, 150),
(150, 50, 150),
(151, 50, 150),
(199, 50, 200)
])
def test_nearest(value, step, expected):
assert jobs.nearest(value, step=step) == expected